Fix compilation errors due to API change

This commit is contained in:
Telesphoreo 2022-05-19 00:20:58 -05:00
parent 10b073a14b
commit e3a3756c26
2 changed files with 9 additions and 8 deletions

View File

@ -16,7 +16,6 @@ import lombok.Getter;
import java.util.Arrays;
//TODO: Implement mongodb
@Getter
public class Guilds extends PlexModule
@ -43,13 +42,16 @@ public class Guilds extends PlexModule
{
getPlex().getMongoConnection().getDatastore().getMapper().map(Guild.class);
getPlex().getMongoConnection().getDatastore().ensureIndexes();
} else {
}
else
{
SQLManager.makeTables();
sqlGuildManager = new SQLGuildManager();
sqlGuildManager.getGuilds().whenComplete((guilds, throwable) -> {
PlexLog.debug("Finished loading {0} guilds", guilds.size());
guilds.forEach(guildHolder::addGuild);
this.registerCommand(new GuildCommand());
sqlGuildManager.getGuilds().whenComplete((guilds, throwable) ->
{
PlexLog.debug("Finished loading {0} guilds", guilds.size());
guilds.forEach(guildHolder::addGuild);
this.registerCommand(new GuildCommand());
});
}

View File

@ -59,7 +59,6 @@ public class ChatHandlerImpl implements IChatHandler
}
event.setCancelled(true);
});
}
public static class PlexChatRenderer implements ChatRenderer
@ -69,7 +68,7 @@ public class ChatHandlerImpl implements IChatHandler
{
String text = PlexUtils.getTextFromComponent(message);
PlexPlayer plexPlayer = PlayerCache.getPlexPlayerMap().get(source.getUniqueId());
PlexPlayer plexPlayer = Plex.get().getPlayerCache().getPlexPlayerMap().get(source.getUniqueId());
Component prefix = Plex.get().getRankManager().getPrefix(plexPlayer);
AtomicBoolean guildPrefix = new AtomicBoolean(false);