doing byes
This commit is contained in:
parent
852be97bae
commit
513db5dd8d
@ -37,7 +37,7 @@ public class Arena
|
||||
|
||||
private ArrayList<Location> _doorBlocks;
|
||||
private boolean _isOpenDoor;
|
||||
private boolean _doorWaitNextRound;
|
||||
private boolean _doBye;
|
||||
|
||||
private ArrayList<Player> _pastPlayers;
|
||||
|
||||
@ -60,19 +60,19 @@ public class Arena
|
||||
_state = ArenaState.EMPTY;
|
||||
_stateTime = System.currentTimeMillis();
|
||||
_particles = new HashMap<>();
|
||||
_doorWaitNextRound = false;
|
||||
_doBye = false;
|
||||
|
||||
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()
|
||||
@ -337,7 +337,7 @@ public class Arena
|
||||
}
|
||||
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'.
|
||||
return;
|
||||
@ -434,7 +434,7 @@ public class Arena
|
||||
closeDoor();
|
||||
_host.setPlayerArena(p, next);
|
||||
UtilTextBottom.display("§c§lTELEPORTED! YOU TOOK TOO LONG!", p);
|
||||
next.setDoorWaitNextRound(true);
|
||||
next.setDoBye(true);
|
||||
}
|
||||
|
||||
_pastPlayers.clear(); // Clear out the un-used players.
|
||||
|
@ -317,7 +317,7 @@ public class Gladiators extends SoloGame
|
||||
a.setState(ArenaState.EMPTY);
|
||||
else if (a.getPastPlayers().size() == 1)
|
||||
{
|
||||
a.setDoorWaitNextRound(true);
|
||||
a.setDoBye(true);
|
||||
a.setState(ArenaState.WAITING);
|
||||
}
|
||||
}
|
||||
@ -390,7 +390,7 @@ public class Gladiators extends SoloGame
|
||||
old.setState(ArenaState.ENDED);
|
||||
current.getPastPlayers().add(p);
|
||||
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.");
|
||||
|
||||
@ -453,7 +453,7 @@ public class Gladiators extends SoloGame
|
||||
|
||||
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;
|
||||
|
||||
a.openDoor();
|
||||
@ -585,8 +585,8 @@ public class Gladiators extends SoloGame
|
||||
_roundState = RoundState.STARTING_5;
|
||||
|
||||
for (Arena a : _gameArenaSet)
|
||||
if (a.isDoorWaitNextRound())
|
||||
a.setDoorWaitNextRound(false);
|
||||
if (a.isDoBye())
|
||||
a.setDoBye(false);
|
||||
|
||||
UtilTextMiddle.display("", C.cGreen + C.Bold + getRoundNotation(), 0, 80 , 0);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user