mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-17 22:47:34 +01:00
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.
This commit is contained in:
parent
2e99e02094
commit
5bb81b75c7
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user