Add essentials.chat.spy.exempt permission. Implements #83

This commit is contained in:
drtshock 2015-08-07 17:05:19 -05:00
parent 8bec43f7a2
commit cafb297594

View File

@ -362,9 +362,11 @@ public class EssentialsPlayerListener implements Listener {
return;
}
if (ess.getSettings().getSocialSpyCommands().contains(cmd) || ess.getSettings().getSocialSpyCommands().contains("*")) {
for (User spyer : ess.getOnlineUsers()) {
if (spyer.isSocialSpyEnabled() && !player.equals(spyer.getBase())) {
spyer.sendMessage(player.getDisplayName() + " : " + event.getMessage());
if(!player.hasPermission("essentials.chat.spy.exempt")) {
for (User spyer : ess.getOnlineUsers()) {
if (spyer.isSocialSpyEnabled() && !player.equals(spyer.getBase())) {
spyer.sendMessage(player.getDisplayName() + " : " + event.getMessage());
}
}
}
} else if (!cmd.equalsIgnoreCase("afk")) {