This commit is contained in:
nulli0n committed 2024-11-24 22:06:38 +05:00
1 parent eaaea371ab
commit 5d5fc08027
1 file changed
+6 -4
@@ -9,6 +9,8 @@ import su.nightexpress.nightcore.util.bukkit.NightItem;
public class MenuItem { public class MenuItem {
protected NightItem item; protected NightItem item;
protected ItemStack itemStack;
protected int priority; protected int priority;
protected int[] slots; protected int[] slots;
@@ -90,16 +92,16 @@ public class MenuItem {
@NotNull @NotNull
@Deprecated @Deprecated
public ItemStack getItemStack() { public ItemStack getItemStack() {
return this.item.getTranslated(); return this.itemStack == null ? this.item.getTranslated() : new ItemStack(this.itemStack);
//return new ItemStack(this.itemStack); //return new ItemStack(this.itemStack);
} }
@NotNull @NotNull
@Deprecated @Deprecated
public MenuItem setItemStack(@NotNull ItemStack itemStack) { public MenuItem setItemStack(@NotNull ItemStack itemStack) {
return this.setItem(NightItem.fromItemStack(itemStack)); //return this.setItem(NightItem.fromItemStack(itemStack));
//this.itemStack = new ItemStack(itemStack); this.itemStack = new ItemStack(itemStack);
//return this; return this;
} }
public int getPriority() { public int getPriority() {