dirty fix for /spy not working

This commit is contained in:
destro174 committed 2021-08-22 10:47:39 +02:00
1 parent 1d5dd7c764
commit 3fd7bbfece
5 files changed
+28 -13

No files matched your search

@@ -25,9 +25,9 @@ public class Spy implements CommandExecutor {
@Override
public void run() {
UUID uuid = ((Player) sender).getUniqueId();
Utility.flipPermission(uuid, Config.SPYPERMISSION);
//Queries.setGlobalChatState(chatUser.isGcOn(), chatUser.getUuid());
sender.sendMessage(MiniMessage.get().parse("You have turned spy " + (!Utility.hasPermission(uuid, Config.GCPERMISSION) ? "<green>on." : "<red>off."))); // TODO load from config and minimessage
ChatUser user = ChatUserManager.getChatUser(uuid);
user.toggleSpy();
sender.sendMessage(MiniMessage.get().parse("You have turned spy " + (user.isSpy() ? "<green>on." : "<red>off."))); // TODO load from config and minimessage
}
}.runTaskAsynchronously(ChatPlugin.getInstance());
return false;