diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java index 67a405655..0c1e8399e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java @@ -151,9 +151,15 @@ public class TreasureLocation implements Listener { player.sendMessage(F.main("Treasure", "You seem to have all treasures for this chest")); player.sendMessage(F.main("Treasure", "unlocked alredy")); - player.sendMessage("Ignoring that too^^"); -// _inventoryManager.addItemToInventory(player, treasureType.getItemName(), 1); -// return; + if(testServer) + { + player.sendMessage("Ignoring that too^^"); + } + else + { + _inventoryManager.addItemToInventory(player, treasureType.getItemName(), 1); + return; + } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index ba7915672..afcbf0d5f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -1850,22 +1850,27 @@ public abstract class Game implements Listener public void disable(){} - //TODO: REMOVE THIS! + @EventHandler public void onCommand(PlayerCommandPreprocessEvent event) { + boolean testServer = getArcadeManager().getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing"); + + if(!testServer) return; + + event.setCancelled(true); + + if(GetState() == GameState.Loading) + { + event.getPlayer().sendMessage(F.main("Game", C.cRed + "Game is loading, please wait")); + return; + } if(event.getMessage().equalsIgnoreCase("/winroom")) { - event.setCancelled(true); List list = new ArrayList<>(UtilServer.getPlayersCollection()); AnnounceEnd(list); Bukkit.getScheduler().runTaskLater(getArcadeManager().getPlugin(), () -> { WinEffectManager.end(); }, 20 * 12); } - if(event.getMessage().equalsIgnoreCase("/winroom2")) - { - event.setCancelled(true); - SetState(GameState.End); - } } }