From 60c2d96996e266f9ab804366b5a92e6198a07d7e Mon Sep 17 00:00:00 2001 From: quentin Date: Wed, 21 Feb 2024 18:32:05 -0600 Subject: [PATCH] Updated for 1.20.4 --- .gitmodules | 3 + canvas | 1 + dependency-reduced-pom.xml | 61 +++++++++++++++++++++ pom.xml | 10 ++-- src/main/java/io/github/officereso/pvp.java | 13 +++-- src/main/resources/config.yml | 10 +--- 6 files changed, 81 insertions(+), 17 deletions(-) create mode 100644 .gitmodules create mode 160000 canvas create mode 100644 dependency-reduced-pom.xml diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2ce3f7c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "canvas"] + path = canvas + url = https://github.com/IPVP-MC/canvas/ diff --git a/canvas b/canvas new file mode 160000 index 0000000..605fd88 --- /dev/null +++ b/canvas @@ -0,0 +1 @@ +Subproject commit 605fd88d4ca3fd9da35e809be8a2dea1cb93f676 diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml new file mode 100644 index 0000000..0722a8c --- /dev/null +++ b/dependency-reduced-pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + io.github.officereso + pvp + 1.1-SNAPSHOT + + + + maven-compiler-plugin + + 8 + 8 + + + + maven-shade-plugin + 3.5.0 + + + package + + shade + + + + + true + + + log4j:log4j + + ** + + + + org.ipvp:canvas:1.7.0-SNAPSHOT + + ** + + + + + + + + + + spigotmc-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + + + org.spigotmc + spigot-api + 1.20.4-R0.1-SNAPSHOT + provided + + + diff --git a/pom.xml b/pom.xml index 67f13d2..e465f49 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.github.officereso pvp - 1.0-SNAPSHOT + 1.1-SNAPSHOT @@ -20,7 +20,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.1.1 + 3.5.0 true @@ -31,7 +31,7 @@ - org.ipvp:canvas:1.5.0-SNAPSHOT + org.ipvp:canvas:1.7.0-SNAPSHOT ** @@ -60,7 +60,7 @@ org.spigotmc spigot-api - 1.15.2-R0.1-SNAPSHOT + 1.20.4-R0.1-SNAPSHOT provided @@ -71,7 +71,7 @@ org.ipvp canvas - 1.5.0-SNAPSHOT + 1.7.0-SNAPSHOT compile diff --git a/src/main/java/io/github/officereso/pvp.java b/src/main/java/io/github/officereso/pvp.java index 9c26f65..6aafaf9 100644 --- a/src/main/java/io/github/officereso/pvp.java +++ b/src/main/java/io/github/officereso/pvp.java @@ -137,7 +137,6 @@ public class pvp extends JavaPlugin implements Listener { Kit.Type type = kit.getType(); int playerLevel = player.getLevel(); switch (type) { - case KIT: switch (info.getClickType()) { case LEFT: @@ -151,6 +150,7 @@ public class pvp extends JavaPlugin implements Listener { updateMenu(selectionWrapper, menu); break; } + break; case HELMET: switch (info.getClickType()) { case LEFT: @@ -164,6 +164,7 @@ public class pvp extends JavaPlugin implements Listener { updateMenu(selectionWrapper, menu); break; } + break; case CHESTPLATE: switch (info.getClickType()) { case LEFT: @@ -177,6 +178,7 @@ public class pvp extends JavaPlugin implements Listener { updateMenu(selectionWrapper, menu); break; } + break; case LEGGINGS: switch (info.getClickType()) { case LEFT: @@ -190,6 +192,7 @@ public class pvp extends JavaPlugin implements Listener { updateMenu(selectionWrapper, menu); break; } + break; case BOOTS: switch (info.getClickType()) { case LEFT: @@ -203,6 +206,7 @@ public class pvp extends JavaPlugin implements Listener { updateMenu(selectionWrapper, menu); break; } + break; case POTION: switch (info.getClickType()) { case LEFT: @@ -216,6 +220,7 @@ public class pvp extends JavaPlugin implements Listener { updateMenu(selectionWrapper, menu); break; } + break; case ADDITIONAL: switch (info.getClickType()) { case LEFT: @@ -230,6 +235,7 @@ public class pvp extends JavaPlugin implements Listener { break; } + break; } }); } @@ -334,10 +340,7 @@ public class pvp extends JavaPlugin implements Listener { (config.getInt(root + kit + ".items." + item + ".amount"))); // Amount of the item PotionMeta potionMeta = (PotionMeta) itemStack.getItemMeta(); - potionMeta.setBasePotionData(new PotionData( - PotionType.valueOf(config.getString(root + kit + ".items." + item + ".basePotionData")), - config.getBoolean(root + kit + ".items." + item + ".extended"), - config.getBoolean(root + kit + ".items." + item + ".upgraded"))); + potionMeta.setBasePotionType(PotionType.valueOf(config.getString(root + kit + ".items." + item + ".basePotionData"))); itemStack.setItemMeta(potionMeta); inventoryItemList.add(new InventoryItem(itemStack, inventoryPos)); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index fefc3dd..73a3545 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -19,23 +19,19 @@ # 1: # material: "SPLASH_POTION" # amount: 1 -# basePotionData: "INSTANT_HEAL" +# basePotionData: "STRONG_HEALING" # extended: false # upgraded: true # inventoryPos: # 2: # material: "SPLASH_POTION" # amount: 1 -# basePotionData: "INSTANT_HEAL" -# extended: false -# upgraded: true +# basePotionData: "STRONG_HEALING" # inventoryPos: # 3: # material: "SPLASH_POTION" # amount: 1 -# basePotionData: "INSTANT_HEAL" -# extended: false -# upgraded: true +# basePotionData: "STRONG_HEALING" # inventoryPos: # cost: 3 # position: 16