mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Actually close the inventory on a *cross*-world teleport.
This commit is contained in:
1 parent
f5f268f939
commit
112e0816b9
1 file changed
+2
-2
@@ -313,12 +313,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
if (fromWorld == toWorld) {
|
||||
entity.netServerHandler.teleport(to);
|
||||
} else {
|
||||
// Close any foreign inventory
|
||||
if (getHandle().activeContainer != getHandle().defaultContainer){
|
||||
getHandle().closeInventory();
|
||||
}
|
||||
entity.netServerHandler.teleport(to);
|
||||
} else {
|
||||
server.getHandle().moveToWorld(entity, toWorld.dimension, true, to);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user