Commits
md_5 authored 9a919a14386
1547 1547 | + org.bukkit.inventory.Recipe recipe = ((CraftingInventory) top).getRecipe(); |
1548 1548 | + if (recipe != null) { |
1549 1549 | + if (click == ClickType.NUMBER_KEY) { |
1550 1550 | + event = new CraftItemEvent(recipe, inventory, type, packetplayinwindowclick.getSlotNum(), click, action, packetplayinwindowclick.getButtonNum()); |
1551 1551 | + } else { |
1552 1552 | + event = new CraftItemEvent(recipe, inventory, type, packetplayinwindowclick.getSlotNum(), click, action); |
1553 1553 | + } |
1554 1554 | + } |
1555 1555 | + } |
1556 1556 | + |
1557 - | + if (packetplayinwindowclick.getSlotNum() == 2 && top instanceof SmithingInventory) { |
1557 + | + if (packetplayinwindowclick.getSlotNum() == 3 && top instanceof SmithingInventory) { |
1558 1558 | + org.bukkit.inventory.ItemStack result = ((SmithingInventory) top).getResult(); |
1559 1559 | + if (result != null) { |
1560 1560 | + if (click == ClickType.NUMBER_KEY) { |
1561 1561 | + event = new SmithItemEvent(inventory, type, packetplayinwindowclick.getSlotNum(), click, action, packetplayinwindowclick.getButtonNum()); |
1562 1562 | + } else { |
1563 1563 | + event = new SmithItemEvent(inventory, type, packetplayinwindowclick.getSlotNum(), click, action); |
1564 1564 | + } |
1565 1565 | + } |
1566 1566 | + } |
1567 1567 | + |