mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Fixed allow-nether being ignored
This commit is contained in:
1 parent
de7402ea8e
commit
c6beae8872
3 files changed
+14
-10
No files matched your search
@@ -217,10 +217,10 @@ public class ServerConfigurationManager {
|
||||
|
||||
// CraftBukkit start
|
||||
public EntityPlayer moveToWorld(EntityPlayer entityplayer, int i, boolean flag) {
|
||||
return this.moveToWorld(entityplayer, i, null);
|
||||
return this.moveToWorld(entityplayer, i, flag, null);
|
||||
}
|
||||
|
||||
public EntityPlayer moveToWorld(EntityPlayer entityplayer, int i, Location location) {
|
||||
public EntityPlayer moveToWorld(EntityPlayer entityplayer, int i, boolean flag, Location location) {
|
||||
this.server.getTracker(entityplayer.dimension).untrackPlayer(entityplayer);
|
||||
// this.server.getTracker(entityplayer.dimension).untrackEntity(entityplayer); // CraftBukkit
|
||||
this.getPlayerManager(entityplayer.dimension).removePlayer(entityplayer);
|
||||
@@ -232,6 +232,10 @@ public class ServerConfigurationManager {
|
||||
EntityPlayer entityplayer1 = entityplayer;
|
||||
org.bukkit.World fromWorld = entityplayer1.getBukkitEntity().getWorld();
|
||||
|
||||
if (flag) {
|
||||
entityplayer1.copyTo(entityplayer);
|
||||
}
|
||||
|
||||
if (location == null) {
|
||||
boolean isBedSpawn = false;
|
||||
CraftWorld cworld = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld);
|
||||
@@ -328,7 +332,7 @@ public class ServerConfigurationManager {
|
||||
finalLocation = event.getPortalTravelAgent().findOrCreate(finalLocation);
|
||||
}
|
||||
toWorld = ((CraftWorld) finalLocation.getWorld()).getHandle();
|
||||
this.moveToWorld(entityplayer, toWorld.dimension, finalLocation);
|
||||
this.moveToWorld(entityplayer, toWorld.dimension, true, finalLocation);
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user