doing byes

This commit is contained in:
William Burns 2015-12-09 21:33:31 +00:00
parent 852be97bae
commit 513db5dd8d
2 changed files with 13 additions and 13 deletions

View File

@ -37,7 +37,7 @@ public class Arena
private ArrayList<Location> _doorBlocks; private ArrayList<Location> _doorBlocks;
private boolean _isOpenDoor; private boolean _isOpenDoor;
private boolean _doorWaitNextRound; private boolean _doBye;
private ArrayList<Player> _pastPlayers; private ArrayList<Player> _pastPlayers;
@ -60,19 +60,19 @@ public class Arena
_state = ArenaState.EMPTY; _state = ArenaState.EMPTY;
_stateTime = System.currentTimeMillis(); _stateTime = System.currentTimeMillis();
_particles = new HashMap<>(); _particles = new HashMap<>();
_doorWaitNextRound = false; _doBye = false;
setupSpawns(); setupSpawns();
} }
public boolean isDoorWaitNextRound() public boolean isDoBye()
{ {
return _doorWaitNextRound; return _doBye;
} }
public void setDoorWaitNextRound(boolean doorWaitNextRound) public void setDoBye(boolean doBye)
{ {
_doorWaitNextRound = doorWaitNextRound; _doBye = doBye;
} }
public Arena getParent() public Arena getParent()
@ -337,7 +337,7 @@ public class Arena
} }
else if (_state == ArenaState.WAITING) else if (_state == ArenaState.WAITING)
{ {
if (isDoorWaitNextRound()) if (isDoBye())
{ {
// They just have to wait. We don't want their door to open just yet. They are a 'bye'. // They just have to wait. We don't want their door to open just yet. They are a 'bye'.
return; return;
@ -434,7 +434,7 @@ public class Arena
closeDoor(); closeDoor();
_host.setPlayerArena(p, next); _host.setPlayerArena(p, next);
UtilTextBottom.display("§c§lTELEPORTED! YOU TOOK TOO LONG!", p); UtilTextBottom.display("§c§lTELEPORTED! YOU TOOK TOO LONG!", p);
next.setDoorWaitNextRound(true); next.setDoBye(true);
} }
_pastPlayers.clear(); // Clear out the un-used players. _pastPlayers.clear(); // Clear out the un-used players.

View File

@ -317,7 +317,7 @@ public class Gladiators extends SoloGame
a.setState(ArenaState.EMPTY); a.setState(ArenaState.EMPTY);
else if (a.getPastPlayers().size() == 1) else if (a.getPastPlayers().size() == 1)
{ {
a.setDoorWaitNextRound(true); a.setDoBye(true);
a.setState(ArenaState.WAITING); a.setState(ArenaState.WAITING);
} }
} }
@ -390,7 +390,7 @@ public class Gladiators extends SoloGame
old.setState(ArenaState.ENDED); old.setState(ArenaState.ENDED);
current.getPastPlayers().add(p); current.getPastPlayers().add(p);
current.setState(ArenaState.WAITING); current.setState(ArenaState.WAITING);
current.setDoorWaitNextRound(true); current.setDoBye(true);
Bukkit.broadcastMessage("§7§lDEBUG: §3" + p.getName() + " left §b" + old.getColour().toString() + " §3and entered §b" + current.getColour().toString() + "§3."); Bukkit.broadcastMessage("§7§lDEBUG: §3" + p.getName() + " left §b" + old.getColour().toString() + " §3and entered §b" + current.getColour().toString() + "§3.");
@ -453,7 +453,7 @@ public class Gladiators extends SoloGame
if (a.getPastPlayers().size() == 1) if (a.getPastPlayers().size() == 1)
{ {
if (a.isOpenDoor() || a.getColour().equals(ArenaType.RED) || a.isDoorWaitNextRound()) if (a.isOpenDoor() || a.getColour().equals(ArenaType.RED) || a.isDoBye())
continue; continue;
a.openDoor(); a.openDoor();
@ -585,8 +585,8 @@ public class Gladiators extends SoloGame
_roundState = RoundState.STARTING_5; _roundState = RoundState.STARTING_5;
for (Arena a : _gameArenaSet) for (Arena a : _gameArenaSet)
if (a.isDoorWaitNextRound()) if (a.isDoBye())
a.setDoorWaitNextRound(false); a.setDoBye(false);
UtilTextMiddle.display("", C.cGreen + C.Bold + getRoundNotation(), 0, 80 , 0); UtilTextMiddle.display("", C.cGreen + C.Bold + getRoundNotation(), 0, 80 , 0);
return; return;