Fixed some logic errors with the new mcchatspy command

This commit is contained in:
nossr50 2019-01-03 02:09:43 -08:00
parent b34f3a1779
commit f4ead570d4
2 changed files with 5 additions and 2 deletions

View File

@ -56,9 +56,12 @@ public abstract class ChatManager {
Party adminParty = UserManager.getPlayer(player).getParty();
//Only message admins not part of this party
if(adminParty != null && !adminParty.getName().equalsIgnoreCase(partyChatEvent.getParty()))
if(adminParty != null)
{
//TODO: Incorporate JSON
if(!adminParty.getName().equalsIgnoreCase(partyChatEvent.getParty()))
player.sendMessage(ChatColor.GOLD+"[SPY: "+ChatColor.GREEN+partyChatEvent.getParty()+ChatColor.GOLD+"] "+message);
} else {
player.sendMessage(ChatColor.GOLD+"[SPY: "+ChatColor.GREEN+partyChatEvent.getParty()+ChatColor.GOLD+"] "+message);
}
}

View File

@ -76,7 +76,7 @@ public class McMMOPlayer {
private boolean abilityUse = true;
private boolean godMode;
private boolean chatSpy = true;
private boolean chatSpy = false; //Off by default
private final Map<SuperAbility, Boolean> abilityMode = new HashMap<SuperAbility, Boolean>();
private final Map<SuperAbility, Boolean> abilityInformed = new HashMap<SuperAbility, Boolean>();