Fix more null pointer issues around deleted worlds - Fixes #3660
This commit is contained in:
@@ -61,9 +61,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start - correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
|
||||
+ entityplayer.supressTrackerForLogin = true;
|
||||
+ worldserver.addPlayerJoin(entityplayer);
|
||||
+ worldserver1.addPlayerJoin(entityplayer);
|
||||
+ this.server.getBossBattleCustomData().a(entityplayer); // see commented out section below worldserver.addPlayerJoin(entityplayer);
|
||||
+ mountSavedVehicle(entityplayer, worldserver, nbttagcompound);
|
||||
+ mountSavedVehicle(entityplayer, worldserver1, nbttagcompound);
|
||||
+ // Paper end
|
||||
// CraftBukkit start
|
||||
PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage);
|
||||
@@ -82,9 +82,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
+ // Paper start - move vehicle into method so it can be called above - short circuit around that code
|
||||
+ onPlayerJoinFinish(entityplayer, worldserver, s1);
|
||||
+ onPlayerJoinFinish(entityplayer, worldserver1, s1);
|
||||
+ }
|
||||
+ private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver, NBTTagCompound nbttagcompound) {
|
||||
+ private void mountSavedVehicle(EntityPlayer entityplayer, WorldServer worldserver1, NBTTagCompound nbttagcompound) {
|
||||
+ // Paper end
|
||||
if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) {
|
||||
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
|
||||
|
||||
Reference in New Issue
Block a user