mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue