1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-03-22 23:15:36 +01:00

SPIGOT-2889: Error cancelling creative InventoryClickEvent

This commit is contained in:
md_5 2016-12-05 09:07:25 +11:00
parent b64d852496
commit a710176e46

View file

@ -1453,7 +1453,7 @@
+ // Reset the slot
+ if (packetplayinsetcreativeslot.a() >= 0) {
+ this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(this.player.defaultContainer.windowId, packetplayinsetcreativeslot.a(), this.player.defaultContainer.getSlot(packetplayinsetcreativeslot.a()).getItem()));
+ this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, null));
+ this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, ItemStack.a));
+ }
+ return;
+ }