Handling slow movers

This commit is contained in:
William Burns 2015-12-08 21:14:19 +00:00
parent 7bdbd5a6af
commit a83ede3caa
2 changed files with 12 additions and 3 deletions

View File

@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilTextBottom;
import mineplex.core.common.util.UtilTextMiddle;
import mineplex.core.common.util.UtilTime;
import mineplex.core.recharge.Recharge;
import nautilus.game.arcade.game.games.gladiators.events.PlayerChangeArenaEvent;
/**
* Created by William (WilliamTiger).
@ -340,9 +341,12 @@ public class Arena
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());
_host.Manager.getPluginManager().callEvent(new PlayerChangeArenaEvent(p, next, this));
_host.setPlayerArena(p, next);
UtilTextBottom.display("§c§lTELEPORTED! YOU TOOK TOO LONG!", p);
}
}
}

View File

@ -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.");
giveLoadout(p, current.getColour());
giveLoadout(p, current.getColour()); //Kit
p.setHealth(p.getMaxHealth()); //Heal
}
private void giveLoadout(Player p, ArenaType type)
@ -552,4 +552,9 @@ public class Gladiators extends SoloGame
else return "ROUND OF " + size;
}
public void setPlayerArena(Player p, Arena a)
{
_playerArenas.put(p, a);
}
}