mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Portal changes.
By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
parent
6d2aad732e
commit
e48a127bc2
1 changed files with 5 additions and 4 deletions
|
@ -170,12 +170,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
WorldServer newWorld = ((CraftWorld)location.getWorld()).getHandle();
|
||||
ServerConfigurationManager manager = server.getHandle();
|
||||
EntityPlayer entity = getHandle();
|
||||
boolean successfulTeleport = entity.netServerHandler.teleport(location);
|
||||
|
||||
if (oldWorld != newWorld && successfulTeleport) {
|
||||
this.entity = manager.a(entity, newWorld.dimension, false);
|
||||
if (oldWorld != newWorld) {
|
||||
manager.a(entity, newWorld.dimension, location);
|
||||
return true; //best guess
|
||||
} else {
|
||||
return entity.netServerHandler.teleport(location);
|
||||
}
|
||||
return successfulTeleport;
|
||||
}
|
||||
|
||||
public void setSneaking(boolean sneak) {
|
||||
|
|
Loading…
Reference in a new issue