diff --git a/pom.xml b/pom.xml index 25779de..fd2e6b5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.sat7 DynamicShop - 3.15.2 + 3.15.3 jar DynamicShop @@ -110,7 +110,7 @@ org.spigotmc spigot-api - 1.18.1-R0.1-SNAPSHOT + 1.20.2-R0.1-SNAPSHOT provided diff --git a/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java b/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java index e0b682b..0897479 100644 --- a/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java +++ b/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java @@ -220,6 +220,14 @@ public ItemStack getPotionItemStack(Material potionMat, PotionType type, boolean return potion; } + public ItemStack getPotionItemStack(Material potionMat, PotionType potionType){ + ItemStack potion = new ItemStack(potionMat, 1); + PotionMeta meta = (PotionMeta) potion.getItemMeta(); + meta.setBasePotionType(potionType); + potion.setItemMeta(meta); + return potion; + } + private void SortAllItems() { ArrayList allItems = new ArrayList<>(); @@ -237,21 +245,7 @@ private void SortAllItems() { for (PotionType pt : PotionType.values()) { - if (pt.isExtendable() && pt.isUpgradeable()) - { - allItems.add(getPotionItemStack(mat, pt, true, false)); - allItems.add(getPotionItemStack(mat, pt, false, true)); - } - else if (pt.isExtendable()) - { - allItems.add(getPotionItemStack(mat, pt, true, false)); - } - else if (pt.isUpgradeable()) - { - allItems.add(getPotionItemStack(mat, pt, false, true)); - } - - allItems.add(getPotionItemStack(mat, pt, false, false)); + allItems.add(getPotionItemStack(mat, pt)); } }