From d06e597ca5e744dddb1cfc9228cba16584141f6c Mon Sep 17 00:00:00 2001 From: EdGruberman Date: Sat, 9 Feb 2013 22:01:39 -0700 Subject: [PATCH] Check TravelAgent.findOrCreate(Location) for null; Fixes BUKKIT-3590 If a custom TravelAgent is used and returns null for findOrCreate method a NullPointerException will occur. Conflicts: src/main/java/net/minecraft/server/PlayerList.java --- src/main/java/net/minecraft/server/PlayerList.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index b0bb672e3c..e857612aee 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -460,6 +460,9 @@ public abstract class PlayerList { } exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo(); + if (exit == null) { + return; + } exitWorld = ((CraftWorld) exit.getWorld()).getHandle(); Vector velocity = entityplayer.getBukkitEntity().getVelocity();