13
0
geforkt von Mirrors/Paper

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.
Dieser Commit ist enthalten in:
James Clarke 2013-02-05 20:34:02 +00:00 committet von feildmaster
Ursprung 2e99e02094
Commit 5bb81b75c7

Datei anzeigen

@ -18,7 +18,7 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent {
public CraftTravelAgent(WorldServer worldserver) { public CraftTravelAgent(WorldServer worldserver) {
super(worldserver); super(worldserver);
if (DEFAULT == null && worldserver.dimension == 0) { if (DEFAULT == null && worldserver.dimension == 0) {
DEFAULT = (TravelAgent) worldserver.s(); DEFAULT = this;
} }
} }