From 05f94920d988b6c9bc82974b44a330a63adc7a64 Mon Sep 17 00:00:00 2001 From: Joe H Date: Tue, 28 Jul 2020 02:12:30 -0400 Subject: [PATCH] Format change (/cmdspy) While executing this during administration I noticed the ratio between execution and response was rather delayed, and I realized it's because the command is waiting for all the tables and grab methods to run before sending the player the enabled/disabled message. This creates a false sense of lag and is as simple as making the message run before anything else, given that the methods run and tables save almost instantly, this won't negatively affect the module or command. --- .../totalfreedom/totalfreedommod/command/Command_cmdspy.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java index f1d55b0a..c0837473 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cmdspy.java @@ -14,12 +14,11 @@ public class Command_cmdspy extends FreedomCommand @Override public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - + msg("CommandSpy " + (admin.getCommandSpy() ? "enabled." : "disabled.")); Admin admin = plugin.al.getAdmin(playerSender); admin.setCommandSpy(!admin.getCommandSpy()); plugin.al.save(admin); plugin.al.updateTables(); - msg("CommandSpy " + (admin.getCommandSpy() ? "enabled." : "disabled.")); return true; }