summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index b6d1f298..aa43435e 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -1044,6 +1044,14 @@ public class NetServerHandler extends NetHandler {
public void a(Packet9Respawn packet9respawn) {}
public void handleContainerClose(Packet101CloseWindow packet101closewindow) {
+ if (this.player.dead) return; // CraftBukkit
+
+ // CraftBukkit start - INVENTORY_CLOSE hook
+ InventoryCloseEvent event = new InventoryCloseEvent(this.player.activeContainer.getBukkitView());
+ server.getPluginManager().callEvent(event);
+ this.player.activeContainer.transferTo(this.player.defaultContainer, getPlayer());
+ // CraftBukkit end
+
this.player.l();
}