mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
[Bleeding] Make sure to close any open inventory windows before teleporting. Thanks md_5.
This commit is contained in:
1 parent
1d04305cea
commit
1d4a9e1df5
1 file changed
+4
@@ -312,6 +312,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
if (fromWorld == toWorld) {
|
||||
// Close any foreign inventory
|
||||
if (getHandle().activeContainer != getHandle().defaultContainer){
|
||||
getHandle().closeInventory();
|
||||
}
|
||||
entity.netServerHandler.teleport(to);
|
||||
} else {
|
||||
server.getHandle().moveToWorld(entity, toWorld.dimension, true, to);
|
||||
|
||||
Reference in new issue
Block a user