This commit is contained in:
Norbi Peti 2018-06-23 21:53:52 +02:00
parent 5c6a62f34d
commit 735f6d4085
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56

View file

@ -144,6 +144,8 @@ public class CommandListener {
if (DiscordPlugin.GameRoles.remove(event.getOldRole().getName()))
DiscordPlugin.sendMessageToChannel(DiscordPlugin.modlogchannel, "Removed " + event.getOldRole().getName() + " as a game role because it's color changed.");
} else {
if (DiscordPlugin.GameRoles.contains(event.getOldRole().getName()) && event.getOldRole().getName().equals(event.getNewRole().getName()))
return;
boolean removed = DiscordPlugin.GameRoles.remove(event.getOldRole().getName()); //Regardless of whether it was a game role
DiscordPlugin.GameRoles.add(event.getNewRole().getName()); //Add it because it has no color
if (removed)