Commits
md_5 authored 2b2d084ac9b
1223 1223 | |
1224 1224 | this.player.a(this.player.activeContainer, nonnulllist); |
1225 1225 | } else { |
1226 1226 | - ItemStack itemstack = this.player.activeContainer.a(packetplayinwindowclick.c(), packetplayinwindowclick.d(), packetplayinwindowclick.g(), this.player); |
1227 1227 | + // CraftBukkit start - Call InventoryClickEvent |
1228 1228 | + if (packetplayinwindowclick.c() < -1 && packetplayinwindowclick.c() != -999) { |
1229 1229 | + return; |
1230 1230 | + } |
1231 1231 | + |
1232 1232 | + InventoryView inventory = this.player.activeContainer.getBukkitView(); |
1233 - | + SlotType type = CraftInventoryView.getSlotType(inventory, packetplayinwindowclick.c()); |
1233 + | + SlotType type = inventory.getSlotType(packetplayinwindowclick.c()); |
1234 1234 | |
1235 1235 | + InventoryClickEvent event; |
1236 1236 | + ClickType click = ClickType.UNKNOWN; |
1237 1237 | + InventoryAction action = InventoryAction.UNKNOWN; |
1238 1238 | + |
1239 1239 | + ItemStack itemstack = ItemStack.a; |
1240 1240 | + |
1241 1241 | + switch (packetplayinwindowclick.g()) { |
1242 1242 | + case PICKUP: |
1243 1243 | + if (packetplayinwindowclick.d() == 0) { |