Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/dependencies.sha256
Original file line number Diff line number Diff line change
@@ -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
24 changes: 12 additions & 12 deletions .github/scripts/install-local-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
14 changes: 7 additions & 7 deletions .github/scripts/prepare-release.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>io.papermc.paper</groupId>
Expand All @@ -33,13 +33,13 @@
<dependency>
<groupId>local</groupId>
<artifactId>joml</artifactId>
<version>1.10.8-tfmc-bf1951014517</version>
<version>1.10.9-tfmc-feca4db85337</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>BungeeCord</artifactId>
<version>1.0-tfmc-3bc6fa2477eb</version>
<version>26.1-R0.1-SNAPSHOT-build2096-tfmc-822e034c64c8</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -58,25 +58,25 @@
<dependency>
<groupId>local</groupId>
<artifactId>MMOItems</artifactId>
<version>6.10-tfmc-c84700df5942</version>
<version>6.10.1-SNAPSHOT-tfmc-a37f7789fcdc</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>MythicLib</artifactId>
<version>1.7-tfmc-660ff2a6ec86</version>
<version>1.7.1-SNAPSHOT-tfmc-225aa7f75d4e</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>MMOCore</artifactId>
<version>1.13.1-tfmc-14850d745437</version>
<version>1.13.1-SNAPSHOT-tfmc-81d511d08309</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>ItemsAdder</artifactId>
<version>3.5.0-tfmc-0116d714822b</version>
<version>4.0.18-tfmc-5a01b37bd744</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down