From 879403e1cebf4c56d69271ce94ddc876c5db692e Mon Sep 17 00:00:00 2001 From: yaohunya <31456652@qq.com> Date: Wed, 24 Jul 2024 19:25:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yaohun/itemlibrary/api/ItemKuAPI.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; + } }