Couple of fixes
This commit is contained in:
parent
1a922da1c3
commit
1dcbf5f7fd
@ -1,5 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.gladiators;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@ -659,7 +660,7 @@ public class Gladiators extends SoloGame
|
||||
|
||||
if (closest != _playerArenas.get(p))
|
||||
{
|
||||
if (closest.getColour().furtherOut(_playerArenas.get(p).getColour()))
|
||||
if (closest.getColour().furtherOut(_playerArenas.get(p).getColour()) || (!_playerArenas.get(p).isOpenDoor()))
|
||||
{
|
||||
// No going backwards. Bounce baby bounce.
|
||||
if (Recharge.Instance.use(p, "Arena Bounce", 500, false, false))
|
||||
@ -674,6 +675,9 @@ public class Gladiators extends SoloGame
|
||||
//p.sendMessage("ARENA MOVE CHECK METHOD!");
|
||||
Manager.getPluginManager().callEvent(new PlayerChangeArenaEvent(e.getPlayer(), closest, _playerArenas.get(p)));
|
||||
_playerArenas.put(p, closest);
|
||||
|
||||
// Push player a little
|
||||
UtilAction.velocity(p, UtilAlg.getTrajectory2d(p.getLocation(), closest.getMid()), 1.7, false, 0.2, 0, 3, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -892,8 +896,8 @@ public class Gladiators extends SoloGame
|
||||
|
||||
if (e.getEntity() instanceof Player)
|
||||
{
|
||||
((Player)e.getEntity()).getInventory().addItem(new ItemStack(Material.ARROW, 1)); // Arrow fix.
|
||||
((Player)e.getEntity()).updateInventory();
|
||||
// ((Player)e.getEntity()).getInventory().addItem(new ItemStack(Material.ARROW, 1)); // Arrow fix.
|
||||
// ((Player)e.getEntity()).updateInventory();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1007,6 +1011,9 @@ public class Gladiators extends SoloGame
|
||||
{
|
||||
if (_playerArenas.containsKey(e.getPlayer()))
|
||||
{
|
||||
if (_playerArenas.get(e.getPlayer()).getState() != ArenaState.FIGHTING)
|
||||
return;
|
||||
|
||||
for (Player p : _playerArenas.get(e.getPlayer()).getPastPlayers())
|
||||
{
|
||||
if (p.equals(e.getPlayer()))
|
||||
@ -1019,4 +1026,17 @@ public class Gladiators extends SoloGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void deathHealth(CombatDeathEvent e)
|
||||
{
|
||||
if (!(e.GetEvent().getEntity() instanceof Player))
|
||||
return;
|
||||
|
||||
if (e.GetLog().GetKiller().IsPlayer())
|
||||
{
|
||||
Player killer = UtilPlayer.searchExact(e.GetLog().GetKiller().GetName());
|
||||
((Player)e.GetEvent().getEntity()).sendMessage(F.main("Game", "Your killer had " + C.cRed + new DecimalFormat("#").format(killer.getHealth()) + "❤" + C.cGray + " left."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user