* Fix bug arena won't start.
This commit is contained in:
parent
3d8898646f
commit
dcce1e2315
@ -3,8 +3,8 @@ package nl.Steffion.BlockHunt.Commands;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import nl.Steffion.BlockHunt.Arena;
|
||||
import nl.Steffion.BlockHunt.ArenaHandler;
|
||||
import nl.Steffion.BlockHunt.W;
|
||||
import nl.Steffion.BlockHunt.Arena.ArenaState;
|
||||
import nl.Steffion.BlockHunt.Managers.CommandC;
|
||||
import nl.Steffion.BlockHunt.Managers.ConfigC;
|
||||
import nl.Steffion.BlockHunt.Managers.MessageM;
|
||||
@ -33,21 +33,19 @@ public class CMDcreate extends DefaultCMD {
|
||||
.equals(W.pos2.get(player).getWorld())) {
|
||||
Arena arena = new Arena(args[1],
|
||||
W.pos1.get(player), W.pos2.get(player), 12,
|
||||
3, 1, 90, 20, 300,
|
||||
3, 1, 50, 20, 300,
|
||||
new ArrayList<ItemStack>(), null, null,
|
||||
null, new ArrayList<String>(),
|
||||
new ArrayList<String>(),
|
||||
new ArrayList<String>(),
|
||||
new ArrayList<Player>(), null, 0,
|
||||
new ArrayList<Player>(),
|
||||
ArenaState.WAITING, 0,
|
||||
new ArrayList<Player>());
|
||||
W.arenas.getFile().set(args[1], arena);
|
||||
W.arenas.save();
|
||||
W.arenas.load();
|
||||
W.signs.load();
|
||||
for (Arena arena2 : W.arenaList) {
|
||||
ArenaHandler.stopArena(arena2);
|
||||
}
|
||||
ArenaHandler.loadArenas();
|
||||
|
||||
W.arenaList.add((Arena) arena);
|
||||
|
||||
MessageM.sendFMessage(player,
|
||||
ConfigC.normal_createCreatedArena, true,
|
||||
|
@ -24,6 +24,7 @@ public class CMDreload extends DefaultCMD {
|
||||
for (Arena arena : W.arenaList) {
|
||||
ArenaHandler.stopArena(arena);
|
||||
}
|
||||
|
||||
ArenaHandler.loadArenas();
|
||||
W.newFiles();
|
||||
MessageM.sendFMessage(player, ConfigC.normal_reloadedConfigs, true);
|
||||
|
@ -1,7 +1,6 @@
|
||||
package nl.Steffion.BlockHunt.Commands;
|
||||
|
||||
import nl.Steffion.BlockHunt.Arena;
|
||||
import nl.Steffion.BlockHunt.ArenaHandler;
|
||||
import nl.Steffion.BlockHunt.W;
|
||||
import nl.Steffion.BlockHunt.Managers.CommandC;
|
||||
import nl.Steffion.BlockHunt.Managers.ConfigC;
|
||||
@ -52,10 +51,8 @@ public class CMDremove extends DefaultCMD {
|
||||
|
||||
W.arenas.save();
|
||||
W.signs.load();
|
||||
for (Arena arena2 : W.arenaList) {
|
||||
ArenaHandler.stopArena(arena2);
|
||||
}
|
||||
ArenaHandler.loadArenas();
|
||||
|
||||
W.arenaList.remove((Arena) arena);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user