* Fixed join bug!

This commit is contained in:
Steffion 2013-08-12 20:44:47 +02:00
parent b8e062f720
commit d4d7df5bc6

View File

@ -66,7 +66,8 @@ public class ArenaHandler {
ConfigC.error_joinNoBlocksSet, true); ConfigC.error_joinNoBlocksSet, true);
} else { } else {
LocationSerializable zero = new LocationSerializable( LocationSerializable zero = new LocationSerializable(
Bukkit.getWorld("world"), 0, 0, 0, 0, 0); Bukkit.getWorld(player.getWorld().getName()
.toString()), 0, 0, 0, 0, 0);
if (arena.lobbyWarp != null && arena.hidersWarp != null if (arena.lobbyWarp != null && arena.hidersWarp != null
&& arena.seekersWarp != null) { && arena.seekersWarp != null) {
if (!arena.lobbyWarp.equals(zero) if (!arena.lobbyWarp.equals(zero)
@ -297,4 +298,15 @@ public class ArenaHandler {
arena.seekers.clear(); arena.seekers.clear();
arena.gameState = ArenaState.WAITING; arena.gameState = ArenaState.WAITING;
} }
public static void stopArena(Arena arena) {
ArenaHandler.sendFMessage(arena, ConfigC.warning_arenaStopped, true);
for (Player player : arena.playersInArena) {
playerLeaveArena(player, false, false);
}
arena.playersInArena.clear();
arena.seekers.clear();
arena.gameState = ArenaState.WAITING;
}
} }