From 7290b83466cb65d61ea4e83158f13f30ef5ab326 Mon Sep 17 00:00:00 2001 From: samczsun Date: Thu, 19 Jan 2017 21:24:50 -0500 Subject: [PATCH] Fix Skywars eating/bowing/whatevering bug --- .../nautilus/game/arcade/game/games/skyfall/Skyfall.java | 3 ++- .../game/games/skyfall/kits/perks/PerkRemoveElytra.java | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java index c35993ab3..d15f72cf2 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/Skyfall.java @@ -1014,14 +1014,15 @@ 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); } - player.getInventory().setChestplate(null); } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/kits/perks/PerkRemoveElytra.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/kits/perks/PerkRemoveElytra.java index a14655a2d..de292b84b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/kits/perks/PerkRemoveElytra.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skyfall/kits/perks/PerkRemoveElytra.java @@ -22,7 +22,7 @@ import nautilus.game.arcade.kit.Perk; * Perk that removes attacked * Players Elytra for the * specified amount of - * tim ein milliseconds. + * time in milliseconds. * * @author xXVevzZXx */ @@ -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,14 +83,15 @@ 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); } - player.getInventory().setChestplate(null); } } }