From e073eca4586ba08220f3e987cb1e3016cd82e93a Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 24 Jul 2013 20:29:32 -0400 Subject: [PATCH] Validation is important. --- .../java/com/gmail/nossr50/listeners/PlayerListener.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index cc29d5366..2419b1169 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -70,7 +70,13 @@ public class PlayerListener implements Listener { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerTeleport(PlayerTeleportEvent event) { - UserManager.getPlayer(event.getPlayer()).actualizeTeleportATS(); + Player player = event.getPlayer(); + + if (Misc.isNPCEntity(player)) { + return; + } + + UserManager.getPlayer(player).actualizeTeleportATS(); } @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)