@Override
public ItemStack[] getUsedTradingRecipe(MerchantInventory merchantInventory) {
try {
InventoryMerchant handle = (InventoryMerchant) ((CraftInventoryMerchant) merchantInventory).getInventory();
MerchantRecipe merchantRecipe = handle.getRecipe();
ItemStack[] recipe = new ItemStack[3];
recipe[0] = merchantRecipe.getBuyItem1() != null ? CraftItemStack.asBukkitCopy(merchantRecipe.getBuyItem1()) : null;
recipe[1] = merchantRecipe.getBuyItem2() != null ? CraftItemStack.asBukkitCopy(merchantRecipe.getBuyItem2()) : null;
recipe[2] = merchantRecipe.getBuyItem3() != null ? CraftItemStack.asBukkitCopy(merchantRecipe.getBuyItem3()) : null;
return recipe;
} catch (Exception e) {
return null;
}
}
NMSHandler.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:Shopkeepers
作者:
评论列表
文章目录