- Fix banning bug + make plex name color config option work

This commit is contained in:
Taah
2022-02-24 23:50:11 -08:00
parent 90c2426987
commit f13bd8a5d5
13 changed files with 20 additions and 24 deletions

View File

@ -73,7 +73,7 @@ public class ChatListener extends PlexListener
{
return Component.empty().append(LegacyComponentSerializer.legacyAmpersand().deserialize(prefix))
.append(Component.space())
.append(sourceDisplayName)
.append(LegacyComponentSerializer.legacyAmpersand().deserialize("&" + plugin.config.getString("chat.name-color") + LegacyComponentSerializer.legacyAmpersand().serialize(sourceDisplayName)))
.append(Component.space())
.append(Component.text("»").color(NamedTextColor.GRAY))
.append(Component.space())

View File

@ -57,17 +57,8 @@ public class PlayerListener extends PlexListener
plexPlayer = DataUtils.getPlayer(player.getUniqueId());
}
PunishedPlayer punishedPlayer;
PunishedPlayer punishedPlayer = PlayerCache.getPunishedPlayer(player.getUniqueId());
PlayerCache.getPlexPlayerMap().put(player.getUniqueId(), plexPlayer); //put them into the cache
if (!PlayerCache.getPunishedPlayerMap().containsKey(player.getUniqueId()))
{
punishedPlayer = new PunishedPlayer(player.getUniqueId());
PlayerCache.getPunishedPlayerMap().put(player.getUniqueId(), punishedPlayer);
}
else
{
punishedPlayer = PlayerCache.getPunishedPlayer(player.getUniqueId());
}
punishedPlayer.convertPunishments();
assert plexPlayer != null;