mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
[Bleeding] Fire inventory close event. Fixes BUKKIT-2036
This commit is contained in:
parent
fe8fc6b90e
commit
07794300d0
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user