From 8502c10653f3a09a36dd7df138b115c96b4a8429 Mon Sep 17 00:00:00 2001 From: Ryan Barlow <7389646+ryanbarlow97@users.noreply.github.com> Date: Wed, 23 Sep 2026 15:16:15 +0000 Subject: [PATCH] build: use consolidated current jar inputs --- .github/dependencies.sha256 | 12 +++++----- .github/scripts/install-local-dependencies.sh | 24 +++++++++---------- .github/scripts/prepare-release.sh | 14 +++++------ pom.xml | 14 +++++------ .../magic/integration/SkillIdResolver.java | 2 +- .../magic/listener/ResonanceCastListener.java | 11 +++++++-- 6 files changed, 42 insertions(+), 35 deletions(-) diff --git a/.github/dependencies.sha256 b/.github/dependencies.sha256 index 1f49abc..1888689 100644 --- a/.github/dependencies.sha256 +++ b/.github/dependencies.sha256 @@ -1,6 +1,6 @@ -bf19510145178df82cd3bd37edd514c13f411531ec5545299fd3abcbc98fe7c2 libs/joml-1.10.8.jar -3bc6fa2477eb30f840d14c6b9e7074d8326ef9a100add8a6db89e85ecf53a3f2 libs/BungeeCord.jar -c84700df5942fd969d3e8c2f1ad2c3ebeb17987ef88b426408d1306e49c4aada libs/MMOItems-6.10.jar -660ff2a6ec86bc8d7779948cf65c1637e271a16e1ef812d6a273f4a5c5eec73c libs/MythicLib-1.7.jar -14850d7454374d7312305d3e84a391be720301e5964963f869b27ae97f6264eb libs/MMOCore-1.13.1.jar -0116d714822b6f0cfebfe833a5df2e4754797b637d0fe709afb762c56da463a3 libs/ItemsAdder_3.5.0-r2.jar +feca4db853371704338621c120acc5cc32300d8af635fa42414b6213301e216b libs/joml-1.10.9.jar +822e034c64c86889b91728fc9a90e74157816879f2cda6e9ccbd5ca5d8515c8a libs/BungeeCord-26.1-R0.1-SNAPSHOT-build2096.jar +a37f7789fcdcd11c9e5890a2fac742aa4501749588af23182991953e06ee1d17 libs/MMOItems-6.10.1-SNAPSHOT.jar +225aa7f75d4e6e6ae6b3ad87a7ca678c025c027f00374ab1062275d24f3a73c9 libs/MythicLib-1.7.1-SNAPSHOT.jar +81d511d0830951f988615b6533cc93e82d00a83fb31e8ccbb36441ae3e8157ef libs/MMOCore-1.13.1-SNAPSHOT.jar +5a01b37bd7442fb0f2c809cadac82ba70f75173956e04efac3336595cc070368 libs/ItemsAdder-4.0.18.jar diff --git a/.github/scripts/install-local-dependencies.sh b/.github/scripts/install-local-dependencies.sh index 56920fc..8ee4873 100644 --- a/.github/scripts/install-local-dependencies.sh +++ b/.github/scripts/install-local-dependencies.sh @@ -5,20 +5,20 @@ set -euo pipefail sha256sum --check .github/dependencies.sha256 mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \ - -Dfile="libs/joml-1.10.8.jar" -DgroupId="local" -DartifactId="joml" \ - -Dversion="1.10.8-tfmc-bf1951014517" -Dpackaging=jar -DgeneratePom=true "$@" + -Dfile="libs/joml-1.10.9.jar" -DgroupId="local" -DartifactId="joml" \ + -Dversion="1.10.9-tfmc-feca4db85337" -Dpackaging=jar -DgeneratePom=true "$@" mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \ - -Dfile="libs/BungeeCord.jar" -DgroupId="local" -DartifactId="BungeeCord" \ - -Dversion="1.0-tfmc-3bc6fa2477eb" -Dpackaging=jar -DgeneratePom=true "$@" + -Dfile="libs/BungeeCord-26.1-R0.1-SNAPSHOT-build2096.jar" -DgroupId="local" -DartifactId="BungeeCord" \ + -Dversion="26.1-R0.1-SNAPSHOT-build2096-tfmc-822e034c64c8" -Dpackaging=jar -DgeneratePom=true "$@" mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \ - -Dfile="libs/MMOItems-6.10.jar" -DgroupId="local" -DartifactId="MMOItems" \ - -Dversion="6.10-tfmc-c84700df5942" -Dpackaging=jar -DgeneratePom=true "$@" + -Dfile="libs/MMOItems-6.10.1-SNAPSHOT.jar" -DgroupId="local" -DartifactId="MMOItems" \ + -Dversion="6.10.1-SNAPSHOT-tfmc-a37f7789fcdc" -Dpackaging=jar -DgeneratePom=true "$@" mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \ - -Dfile="libs/MythicLib-1.7.jar" -DgroupId="local" -DartifactId="MythicLib" \ - -Dversion="1.7-tfmc-660ff2a6ec86" -Dpackaging=jar -DgeneratePom=true "$@" + -Dfile="libs/MythicLib-1.7.1-SNAPSHOT.jar" -DgroupId="local" -DartifactId="MythicLib" \ + -Dversion="1.7.1-SNAPSHOT-tfmc-225aa7f75d4e" -Dpackaging=jar -DgeneratePom=true "$@" mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \ - -Dfile="libs/MMOCore-1.13.1.jar" -DgroupId="local" -DartifactId="MMOCore" \ - -Dversion="1.13.1-tfmc-14850d745437" -Dpackaging=jar -DgeneratePom=true "$@" + -Dfile="libs/MMOCore-1.13.1-SNAPSHOT.jar" -DgroupId="local" -DartifactId="MMOCore" \ + -Dversion="1.13.1-SNAPSHOT-tfmc-81d511d08309" -Dpackaging=jar -DgeneratePom=true "$@" mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \ - -Dfile="libs/ItemsAdder_3.5.0-r2.jar" -DgroupId="local" -DartifactId="ItemsAdder" \ - -Dversion="3.5.0-tfmc-0116d714822b" -Dpackaging=jar -DgeneratePom=true "$@" + -Dfile="libs/ItemsAdder-4.0.18.jar" -DgroupId="local" -DartifactId="ItemsAdder" \ + -Dversion="4.0.18-tfmc-5a01b37bd744" -Dpackaging=jar -DgeneratePom=true "$@" diff --git a/.github/scripts/prepare-release.sh b/.github/scripts/prepare-release.sh index 9f57229..1dd1106 100644 --- a/.github/scripts/prepare-release.sh +++ b/.github/scripts/prepare-release.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash set -euo pipefail : "${GH_TOKEN:?Set DEPS_TOKEN with Contents read access to TF-Minecraft/ServerAssets}" -ref=dd1e3ec5ee27d2467d5c07f9458bef212344ec41 +ref=4b80431398e4ff35d703cad915b7ee4e5924a763 mkdir -p libs -curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/bf1951014517/joml-1.10.8.jar?ref=$ref" > "libs/joml-1.10.8.jar" -curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/3bc6fa2477eb/BungeeCord.jar?ref=$ref" > "libs/BungeeCord.jar" -curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/c84700df5942/MMOItems-6.10.jar?ref=$ref" > "libs/MMOItems-6.10.jar" -curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/660ff2a6ec86/MythicLib-1.7.jar?ref=$ref" > "libs/MythicLib-1.7.jar" -curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/14850d745437/MMOCore-1.13.1.jar?ref=$ref" > "libs/MMOCore-1.13.1.jar" -curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/0116d714822b/ItemsAdder_3.5.0-r2.jar?ref=$ref" > "libs/ItemsAdder_3.5.0-r2.jar" +curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/feca4db85337/joml-1.10.9.jar?ref=$ref" > "libs/joml-1.10.9.jar" +curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/822e034c64c8/BungeeCord-26.1-R0.1-SNAPSHOT-build2096.jar?ref=$ref" > "libs/BungeeCord-26.1-R0.1-SNAPSHOT-build2096.jar" +curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/a37f7789fcdc/MMOItems-6.10.1-SNAPSHOT.jar?ref=$ref" > "libs/MMOItems-6.10.1-SNAPSHOT.jar" +curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/225aa7f75d4e/MythicLib-1.7.1-SNAPSHOT.jar?ref=$ref" > "libs/MythicLib-1.7.1-SNAPSHOT.jar" +curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/81d511d08309/MMOCore-1.13.1-SNAPSHOT.jar?ref=$ref" > "libs/MMOCore-1.13.1-SNAPSHOT.jar" +curl --fail --location --silent --show-error --retry 3 -H "Authorization: Bearer $GH_TOKEN" -H "Accept: application/vnd.github.raw+json" "https://api.github.com/repos/TF-Minecraft/ServerAssets/contents/jars/5a01b37bd744/ItemsAdder-4.0.18.jar?ref=$ref" > "libs/ItemsAdder-4.0.18.jar" bash .github/scripts/install-local-dependencies.sh "$@" diff --git a/pom.xml b/pom.xml index 25d6a37..5bf88f4 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ com.google.code.gson gson - 2.10.1 + 2.14.0 io.papermc.paper @@ -33,13 +33,13 @@ local joml - 1.10.8-tfmc-bf1951014517 + 1.10.9-tfmc-feca4db85337 provided local BungeeCord - 1.0-tfmc-3bc6fa2477eb + 26.1-R0.1-SNAPSHOT-build2096-tfmc-822e034c64c8 provided @@ -58,25 +58,25 @@ local MMOItems - 6.10-tfmc-c84700df5942 + 6.10.1-SNAPSHOT-tfmc-a37f7789fcdc provided local MythicLib - 1.7-tfmc-660ff2a6ec86 + 1.7.1-SNAPSHOT-tfmc-225aa7f75d4e provided local MMOCore - 1.13.1-tfmc-14850d745437 + 1.13.1-SNAPSHOT-tfmc-81d511d08309 provided local ItemsAdder - 3.5.0-tfmc-0116d714822b + 4.0.18-tfmc-5a01b37bd744 provided diff --git a/src/main/java/net/tfminecraft/magic/integration/SkillIdResolver.java b/src/main/java/net/tfminecraft/magic/integration/SkillIdResolver.java index ad85d7f..86b44b4 100644 --- a/src/main/java/net/tfminecraft/magic/integration/SkillIdResolver.java +++ b/src/main/java/net/tfminecraft/magic/integration/SkillIdResolver.java @@ -35,7 +35,7 @@ public static String resolveSkillId(Skill cast) { } if (cast instanceof CastableSkill castable) { - RegisteredSkill registered = castable.getSkill().getSkill(); + SkillHandler registered = castable.getSkill().getSkill(); if (registered != null && registered.getName() != null && !registered.getName().isBlank()) { return registered.getName(); } diff --git a/src/main/java/net/tfminecraft/magic/listener/ResonanceCastListener.java b/src/main/java/net/tfminecraft/magic/listener/ResonanceCastListener.java index 8a688b8..e19c5af 100644 --- a/src/main/java/net/tfminecraft/magic/listener/ResonanceCastListener.java +++ b/src/main/java/net/tfminecraft/magic/listener/ResonanceCastListener.java @@ -10,9 +10,11 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; import io.lumine.mythic.lib.api.event.skill.PlayerCastSkillEvent; +import io.lumine.mythic.lib.api.item.NBTItem; import io.lumine.mythic.lib.skill.Skill; import net.Indyuce.mmoitems.api.interaction.util.DurabilityItem; import net.tfminecraft.magic.Cache; @@ -108,8 +110,13 @@ public void onPlayerCastSkill(PlayerCastSkillEvent event) { } private static void wearWeapon(Player player, HeldSlot slot, ItemStack weapon) { - DurabilityItem durability = new DurabilityItem(player, weapon); - if (!durability.isValid()) { + NBTItem nbt = NBTItem.get(weapon); + if (nbt.getInteger("MMOITEMS_MAX_DURABILITY") <= 0) { + return; + } + DurabilityItem durability = DurabilityItem.from(player, nbt, + slot == HeldSlot.MAIN_HAND ? EquipmentSlot.HAND : EquipmentSlot.OFF_HAND); + if (durability == null) { return; } GearHand.setHeld(player, slot, durability.decreaseDurability(1).toItem());