public void endRound() { RoomManager roomManager = TheBuildingGame.getInstance().getGameBackend().getRoomManager(); for (Entry<BgPlayer, Room> entry : roomAllocation.entrySet()) { Room room = entry.getValue(); roomManager.setRoomRegionOwner(room.getX(), room.getZ(), null); } }
public void cleanup() { RoomManager roomManager = TheBuildingGame.getInstance().getGameBackend().getRoomManager(); for (Room room : roomAllocation.values()) { room.setInUse(false); roomManager.setRoomRegionOwner(room.getX(), room.getZ(), null); } roomAllocation.clear(); }
public void startRound() { RoomManager roomManager = TheBuildingGame.getInstance().getGameBackend().getRoomManager(); for (Entry<BgPlayer, Room> entry : roomAllocation.entrySet()) { entry.getKey().getPlayer().getInventory().clear(); Room room = entry.getValue(); roomManager.setRoomRegionOwner( room.getX(), room.getZ(), (this instanceof RoundBuild && !(this instanceof RoundResults)) ? entry.getKey() : null); } }