diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkEndermanTeleport.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkEndermanTeleport.java index c55aa293f..7a0bf6059 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkEndermanTeleport.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/perks/PerkEndermanTeleport.java @@ -13,10 +13,10 @@ import org.bukkit.event.player.PlayerQuitEvent; import mineplex.core.common.util.C; import mineplex.core.common.util.UtilParticle; -import mineplex.core.common.util.UtilServer; -import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; @@ -37,10 +37,13 @@ public class PerkEndermanTeleport extends SmashPerk @EventHandler public void update(UpdateEvent event) - { + { if (event.getType() != UpdateType.TICK) return; + if(!Manager.GetGame().IsLive()) + return; + for (Player player : UtilServer.getPlayers()) { if (!Kit.HasKit(player)) @@ -88,7 +91,7 @@ public class PerkEndermanTeleport extends SmashPerk } player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 0.5f); - player.teleport(block.getLocation().add(0.5, 1, 0.5)); + player.teleport(block.getLocation().add(0.5, 1, 0.5).setDirection(player.getLocation().getDirection())); player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 0.5f); UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0.1f, 100, ViewDist.LONG, UtilServer.getPlayers());