use of org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventoryCrafting in project Mohist by MohistMC.
the class CraftEventFactory method callPreCraftEvent.
public static ItemStack callPreCraftEvent(Container matrix, Container resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
CraftInventoryCrafting inventory = new CraftInventoryCrafting(matrix, resultInventory);
inventory.setResult(CraftItemStack.asCraftMirror(result));
PrepareItemCraftEvent event = new PrepareItemCraftEvent(inventory, lastCraftView, isRepair);
Bukkit.getPluginManager().callEvent(event);
org.bukkit.inventory.ItemStack bitem = event.getInventory().getResult();
return CraftItemStack.asNMSCopy(bitem);
}
use of org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventoryCrafting in project Magma by magmafoundation.
the class CraftEventFactory method callPreCraftEvent.
public static ItemStack callPreCraftEvent(InventoryCrafting matrix, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
CraftInventoryCrafting inventory = new CraftInventoryCrafting(matrix, matrix.resultInventory);
inventory.setResult(CraftItemStack.asCraftMirror(result));
PrepareItemCraftEvent event = new PrepareItemCraftEvent(inventory, lastCraftView, isRepair);
Bukkit.getPluginManager().callEvent(event);
org.bukkit.inventory.ItemStack bitem = event.getInventory().getResult();
return CraftItemStack.asNMSCopy(bitem);
}
use of org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventoryCrafting in project Magma-1.16.x by magmafoundation.
the class CraftEventFactory method callPreCraftEvent.
public static ItemStack callPreCraftEvent(IInventory matrix, IInventory resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
CraftInventoryCrafting inventory = new CraftInventoryCrafting(matrix, resultInventory);
inventory.setResult(CraftItemStack.asCraftMirror(result));
PrepareItemCraftEvent event = new PrepareItemCraftEvent(inventory, lastCraftView, isRepair);
Bukkit.getPluginManager().callEvent(event);
org.bukkit.inventory.ItemStack bitem = event.getInventory().getResult();
return CraftItemStack.asNMSCopy(bitem);
}
use of org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventoryCrafting in project LoliServer by Loli-Server.
the class CraftEventFactory method callPreCraftEvent.
public static ItemStack callPreCraftEvent(IInventory matrix, IInventory resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
CraftInventoryCrafting inventory = new CraftInventoryCrafting(matrix, resultInventory);
inventory.setResult(CraftItemStack.asCraftMirror(result));
PrepareItemCraftEvent event = new PrepareItemCraftEvent(inventory, lastCraftView, isRepair);
Bukkit.getPluginManager().callEvent(event);
org.bukkit.inventory.ItemStack bitem = event.getInventory().getResult();
return CraftItemStack.asNMSCopy(bitem);
}
Aggregations