Fix Skywars eating/bowing/whatevering bug

This commit is contained in:
samczsun 2017-01-19 21:24:50 -05:00
parent 5ca9b79333
commit 7290b83466
2 changed files with 6 additions and 4 deletions

View File

@ -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()
{

View File

@ -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);
}
}
}
}
}
}