Handling slow movers
This commit is contained in:
parent
7bdbd5a6af
commit
a83ede3caa
@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilTextBottom;
|
|||||||
import mineplex.core.common.util.UtilTextMiddle;
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
|
import nautilus.game.arcade.game.games.gladiators.events.PlayerChangeArenaEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by William (WilliamTiger).
|
* Created by William (WilliamTiger).
|
||||||
@ -340,9 +341,12 @@ public class Arena
|
|||||||
|
|
||||||
for (Player p : getPastPlayers())
|
for (Player p : getPastPlayers())
|
||||||
{
|
{
|
||||||
//Teleport after 15 seconds of waiting.
|
// TP after 15 seconds of waiting
|
||||||
|
|
||||||
p.teleport(UtilAlg.getLocationAwayFromPlayers(next.getSpawns(), _host.GetPlayers(true)).clone());
|
p.teleport(UtilAlg.getLocationAwayFromPlayers(next.getSpawns(), _host.GetPlayers(true)).clone());
|
||||||
|
_host.Manager.getPluginManager().callEvent(new PlayerChangeArenaEvent(p, next, this));
|
||||||
|
_host.setPlayerArena(p, next);
|
||||||
|
UtilTextBottom.display("§c§lTELEPORTED! YOU TOOK TOO LONG!", p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -347,8 +347,8 @@ public class Gladiators extends SoloGame
|
|||||||
|
|
||||||
p.sendMessage("§7§lDEBUG: §3You left §b" + old.getColour().toString() + " §3and entered §b" + current.getColour().toString() + "§3.");
|
p.sendMessage("§7§lDEBUG: §3You left §b" + old.getColour().toString() + " §3and entered §b" + current.getColour().toString() + "§3.");
|
||||||
|
|
||||||
giveLoadout(p, current.getColour());
|
giveLoadout(p, current.getColour()); //Kit
|
||||||
|
p.setHealth(p.getMaxHealth()); //Heal
|
||||||
}
|
}
|
||||||
|
|
||||||
private void giveLoadout(Player p, ArenaType type)
|
private void giveLoadout(Player p, ArenaType type)
|
||||||
@ -552,4 +552,9 @@ public class Gladiators extends SoloGame
|
|||||||
else return "ROUND OF " + size;
|
else return "ROUND OF " + size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPlayerArena(Player p, Arena a)
|
||||||
|
{
|
||||||
|
_playerArenas.put(p, a);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user