public boolean addPlayer(Game game, UUID uuid) { if (playerManager.getCurrentGame(uuid) != null) { getLogger() .warning( "Tried to add player " + uuid + " to game " + game.getUuid() + " but they were already in game " + playerManager.getCurrentGame(uuid).getUuid()); return false; } else { playerManager.setCurrentGame(uuid, game); return true; } }
@Override public void onDisable() { playerManager.clear(); worldManager.clear(); eventManager.clear(); gameManager.clear(); if (hearts != null) hearts.disable(); instance = null; }
public void unregisterGame(Game game) { eventManager.unregisterGame(game); worldManager.unregisterGame(game); playerManager.unregisterGame(game); gameManager.unregisterGame(game); }