geforkt von Mirrors/Paper
Close inventory on teleport. FIXES BUKKIT-3021.
Dieser Commit ist enthalten in:
Ursprung
d06e597ca5
Commit
993e19b3fb
@ -381,14 +381,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
WorldServer fromWorld = ((CraftWorld) from.getWorld()).getHandle();
|
WorldServer fromWorld = ((CraftWorld) from.getWorld()).getHandle();
|
||||||
WorldServer toWorld = ((CraftWorld) to.getWorld()).getHandle();
|
WorldServer toWorld = ((CraftWorld) to.getWorld()).getHandle();
|
||||||
|
|
||||||
|
// Close any foreign inventory
|
||||||
|
if (getHandle().activeContainer != getHandle().defaultContainer) {
|
||||||
|
getHandle().closeInventory();
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the fromWorld and toWorld are the same.
|
// Check if the fromWorld and toWorld are the same.
|
||||||
if (fromWorld == toWorld) {
|
if (fromWorld == toWorld) {
|
||||||
entity.playerConnection.teleport(to);
|
entity.playerConnection.teleport(to);
|
||||||
} else {
|
} else {
|
||||||
// Close any foreign inventory
|
|
||||||
if (getHandle().activeContainer != getHandle().defaultContainer){
|
|
||||||
getHandle().closeInventory();
|
|
||||||
}
|
|
||||||
server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, true);
|
server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, true);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren