Made debugging tools only available on test servers
This commit is contained in:
parent
816a7ca232
commit
a27a618b2f
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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<Player> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user