diff options
author | EdGruberman <ed@rjump.com> | 2013-02-09 22:01:39 -0700 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-02-10 17:21:59 -0600 |
commit | d06e597ca5e744dddb1cfc9228cba16584141f6c (patch) | |
tree | 98e037b898106f3d209fd667c1567e8b2de9b718 /src/main/java/net | |
parent | 5bb81b75c73898613f4dae3066945d0a9042067a (diff) | |
download | craftbukkit-d06e597ca5e744dddb1cfc9228cba16584141f6c.tar craftbukkit-d06e597ca5e744dddb1cfc9228cba16584141f6c.tar.gz craftbukkit-d06e597ca5e744dddb1cfc9228cba16584141f6c.tar.lz craftbukkit-d06e597ca5e744dddb1cfc9228cba16584141f6c.tar.xz craftbukkit-d06e597ca5e744dddb1cfc9228cba16584141f6c.zip |
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
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerList.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index b0bb672e..e857612a 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(); |