diff --git a/src/main/java/com/yaohun/itemlibrary/api/ItemKuAPI.java b/src/main/java/com/yaohun/itemlibrary/api/ItemKuAPI.java index d4256b1..cc4ba54 100644 --- a/src/main/java/com/yaohun/itemlibrary/api/ItemKuAPI.java +++ b/src/main/java/com/yaohun/itemlibrary/api/ItemKuAPI.java @@ -2,6 +2,7 @@ package com.yaohun.itemlibrary.api; import com.yaohun.itemlibrary.data.SortData; import com.yaohun.itemlibrary.main; +import com.yaohun.itemlibrary.manage.SortManager; import me.Demon.DemonPlugin.DemonAPI; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; @@ -21,4 +22,17 @@ public abstract class ItemKuAPI { } return DemonAPI.getErrItems(); } + + public static ItemStack getItems(String itemKey){ + SortManager sortManager = main.sortManager; + ItemStack stack = sortManager.getItemStack(itemKey); + stack.setAmount(1); + return stack; + } + public static ItemStack getItems(String itemKey,int amount){ + SortManager sortManager = main.sortManager; + ItemStack stack = sortManager.getItemStack(itemKey); + stack.setAmount(amount); + return stack; + } }