3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 05:20:05 +01:00

Actually close the inventory on a *cross*-world teleport.

Dieser Commit ist enthalten in:
Erik Broes 2012-01-17 22:50:18 +01:00
Ursprung f5f268f939
Commit 112e0816b9

Datei anzeigen

@ -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;