From 5bb81b75c73898613f4dae3066945d0a9042067a Mon Sep 17 00:00:00 2001 From: James Clarke Date: Tue, 5 Feb 2013 20:34:02 +0000 Subject: [PATCH] Set CraftTravelAgent.DEFAULT to a non-null value. Fixes BUKKIT-3578 Currently, CraftTravelAgent will call s() on the passed-in WorldServer in order to set DEFAULT. However, s() will always return null at this point, because WorldServer.P will still be null, as it is set after the constructor is called. Instead, we set CraftTravelAgent.DEFAULT to the instance that is being constructed. --- src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java index 3a313e5349..fad2d8aac8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java @@ -18,7 +18,7 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent { public CraftTravelAgent(WorldServer worldserver) { super(worldserver); if (DEFAULT == null && worldserver.dimension == 0) { - DEFAULT = (TravelAgent) worldserver.s(); + DEFAULT = this; } }