From ccfe7c41d7bacd703bd9f6538ffc8502e2b2cf21 Mon Sep 17 00:00:00 2001 From: ArcticZeroo Date: Sat, 21 Oct 2017 11:42:42 -0400 Subject: [PATCH] Remove test server check in AntihackLogger --- .../core/antihack/logging/AntihackLogger.java | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/logging/AntihackLogger.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/logging/AntihackLogger.java index bdc62aa9e..7fc09ed54 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/logging/AntihackLogger.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/logging/AntihackLogger.java @@ -75,30 +75,27 @@ public class AntihackLogger extends MiniPlugin public void addCommands() { - if (UtilServer.isTestServer()) + addCommand(new CommandBase(this, Perm.SAVE_METADATA_COMMAND, "savemetadata") { - addCommand(new CommandBase(this, Perm.SAVE_METADATA_COMMAND, "savemetadata") + @Override + public void Execute(Player caller, String[] args) { - @Override - public void Execute(Player caller, String[] args) + if (args.length == 1) { - if (args.length == 1) + Player player = Bukkit.getPlayer(args[0]); + if (player != null) { - Player player = Bukkit.getPlayer(args[0]); - if (player != null) + JsonObject custom = new JsonObject(); + custom.addProperty("is-test-metadata", true); + String id = AntiHack.generateId(); + saveMetadata(player, id, () -> { - JsonObject custom = new JsonObject(); - custom.addProperty("is-test-metadata", true); - String id = AntiHack.generateId(); - saveMetadata(player, id, () -> - { - UtilPlayer.message(caller, F.main(getName(), "Saved metadata for " + player.getName() + " with id " + id)); - }, custom); - } + UtilPlayer.message(caller, F.main(getName(), "Saved metadata for " + player.getName() + " with id " + id)); + }, custom); } } - }); - } + } + }); } @EventHandler