Add Spy command to toggle SocialSpy

This commit is contained in:
destro174
2021-08-01 15:08:05 +02:00
parent c1a51dc803
commit 097541e86f
4 changed files with 42 additions and 3 deletions
@@ -64,7 +64,7 @@ public class ChatHandler {
sendPrivateMessage(player, target, "privatemessage", component);
Component spymessage = miniMessage.parse(Config.MESSAGESPY, templates);
for(Player pl : Bukkit.getOnlinePlayers()) {
if(pl.hasPermission("chat.social-spy") && !pl.equals(player) && !pl.getName().equalsIgnoreCase(target)) { // todo add a toggle for social spy
if(pl.hasPermission(Config.SPYPERMISSION) && !pl.equals(player) && !pl.getName().equalsIgnoreCase(target)) { // todo add a toggle for social spy
pl.sendMessage(spymessage);
}
}