Fix Skywars eating/bowing/whatevering bug
This commit is contained in:
parent
5ca9b79333
commit
7290b83466
@ -1014,18 +1014,19 @@ public abstract class Skyfall extends Game
|
||||
if (System.currentTimeMillis() > _disabledElytras.get(player.getUniqueId()))
|
||||
{
|
||||
player.getInventory().setChestplate(new ItemStack(Material.ELYTRA));
|
||||
_disabledElytras.remove(player.getUniqueId());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.getInventory().getChestplate() != null)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Game", C.cRed + "Your Elytra is disabled!"));
|
||||
}
|
||||
player.getInventory().setChestplate(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isDeathMatch()
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ public class PerkRemoveElytra extends Perk
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void stunnEnemy(CustomDamageEvent event)
|
||||
public void stunEnemy(CustomDamageEvent event)
|
||||
{
|
||||
if (Manager.GetGame() == null)
|
||||
return;
|
||||
@ -83,17 +83,18 @@ public class PerkRemoveElytra extends Perk
|
||||
if (System.currentTimeMillis() > _disabled.get(player.getUniqueId()))
|
||||
{
|
||||
player.getInventory().setChestplate(new ItemStack(Material.ELYTRA));
|
||||
_disabled.remove(player.getUniqueId());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.getInventory().getChestplate() != null)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Game", C.cRed + "Your Elytra is disabled!"));
|
||||
}
|
||||
player.getInventory().setChestplate(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user