Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
[Bleeding] Check top inventory type when determining whether a click event is a craft event. Fixes BUKKIT-1112
- Credit to Taufiq Hoven for locating the root cause of the issue.
Dieser Commit ist enthalten in:
Ursprung
f7da5d2ad7
Commit
db5f804482
@ -1147,8 +1147,8 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
SlotType type = CraftInventoryView.getSlotType(inventory, packet102windowclick.slot);
|
||||
|
||||
InventoryClickEvent event;
|
||||
if (inventory instanceof CraftingInventory) {
|
||||
Recipe recipe = ((CraftingInventory)inventory.getTopInventory()).getRecipe();
|
||||
if (packet102windowclick.slot == 0 && inventory.getTopInventory() instanceof CraftingInventory) {
|
||||
Recipe recipe = ((CraftingInventory) inventory.getTopInventory()).getRecipe();
|
||||
event = new CraftItemEvent(recipe, inventory, type, packet102windowclick.slot, packet102windowclick.button != 0, packet102windowclick.shift);
|
||||
} else {
|
||||
event = new InventoryClickEvent(inventory, type, packet102windowclick.slot, packet102windowclick.button != 0, packet102windowclick.shift);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren