mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-27 19:47:42 +01:00
Add essentials.chat.spy.exempt permission. Implements #83
This commit is contained in:
parent
8bec43f7a2
commit
cafb297594
@ -362,11 +362,13 @@ public class EssentialsPlayerListener implements Listener {
|
||||
return;
|
||||
}
|
||||
if (ess.getSettings().getSocialSpyCommands().contains(cmd) || ess.getSettings().getSocialSpyCommands().contains("*")) {
|
||||
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")) {
|
||||
final User user = ess.getUser(player);
|
||||
user.updateActivity(true);
|
||||
|
Loading…
Reference in New Issue
Block a user