dirty fix for /spy not working

This commit is contained in:
destro174
2021-08-22 10:47:39 +02:00
parent 1d5dd7c764
commit 3fd7bbfece
5 changed files with 28 additions and 13 deletions
@@ -72,7 +72,7 @@ public class ChatHandler {
sendPrivateMessage(player, target, "privatemessage", component);
Component spymessage = miniMessage.parse(Config.MESSAGESPY, templates);
for(Player pl : Bukkit.getOnlinePlayers()) {
if(pl.hasPermission(Config.SPYPERMISSION) && !pl.equals(player) && !pl.getName().equalsIgnoreCase(target)) { // todo add a toggle for social spy
if(pl.hasPermission(Config.SPYPERMISSION) && ChatUserManager.getChatUser(pl.getUniqueId()).isSpy() && !pl.equals(player) && !pl.getName().equalsIgnoreCase(target)) { // todo add a toggle for social spy
pl.sendMessage(spymessage);
}
}