Skip to content

Commit

Permalink
Compatibility Update for MC 1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
7sat committed Dec 17, 2023
1 parent ff6588a commit 1dff0cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.sat7</groupId>
<artifactId>DynamicShop</artifactId>
<version>3.15.2</version>
<version>3.15.3</version>
<packaging>jar</packaging>

<name>DynamicShop</name>
Expand Down Expand Up @@ -110,7 +110,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<version>1.20.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
24 changes: 9 additions & 15 deletions src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<ItemStack> allItems = new ArrayList<>();
Expand All @@ -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));
}
}

Expand Down

0 comments on commit 1dff0cb

Please sign in to comment.