Recipe recipe = ((CraftingInventory) inv).getRecipe(); if (clickType == ClickType.NUMBER_KEY) { event = new CraftItemEvent(recipe, view, slotType, viewSlot, clickType, action, message.getButton()); } else { event = new CraftItemEvent(recipe, view, slotType, viewSlot, clickType, action);