It will have to be fixed again at a later date
This commit is contained in:
Norbi Peti 2020-09-04 03:56:25 +02:00
parent b483b7df0c
commit 59dbc78b52
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56

View file

@ -96,9 +96,9 @@ public class PlayerListener implements Listener {
public void onNickChange(NickChangeEvent e) {
String nick = e.getValue();
if (nick == null)
nicknames.inverse().remove(e.getAffected().getBase().getUniqueId());
nicknames.inverse().remove(e.getController().getBase().getUniqueId()); //EssentialsX has it swapped
else
nicknames.inverse().forcePut(e.getAffected().getBase().getUniqueId(), ChatColor.stripColor(nick).toLowerCase());
nicknames.inverse().forcePut(e.getController().getBase().getUniqueId(), ChatColor.stripColor(nick).toLowerCase());
Bukkit.getScheduler().runTaskLater(PluginMain.Instance, () -> {
TownColorComponent.updatePlayerColors(e.getAffected().getBase()); //Won't fire this event again