From 3f32ed4e337d4d3419331eae5f7a7aa1891ed848 Mon Sep 17 00:00:00 2001
From: Ryan Barlow <7389646+ryanbarlow97@users.noreply.github.com>
Date: Tue, 22 Sep 2026 18:18:31 +0000
Subject: [PATCH] build: target Java 21 and Minecraft 1.21.10
---
.github/dependencies.sha256 | 1 -
.github/scripts/prepare-release.sh | 1 -
.github/workflows/build.yml | 2 +-
.github/workflows/release.yml | 2 +-
pom.xml | 22 ++++++++++++++-----
.../AdvancedGunpowder/GunpowderEvents.java | 12 +++++-----
src/main/resources/plugin.yml | 2 +-
7 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/.github/dependencies.sha256 b/.github/dependencies.sha256
index c3a9319..15bec7c 100644
--- a/.github/dependencies.sha256
+++ b/.github/dependencies.sha256
@@ -1,4 +1,3 @@
d52cc0c734a9bb942428a403bb3630123596bcd9c94d3a77ea2782046b113af5 libs/MMOCore-1.11.3.jar
c84700df5942fd969d3e8c2f1ad2c3ebeb17987ef88b426408d1306e49c4aada libs/MMOItems-6.10.jar
660ff2a6ec86bc8d7779948cf65c1637e271a16e1ef812d6a273f4a5c5eec73c libs/MythicLib-1.7.jar
-97e0c708c1e319189ce1cda049244551a105860d51e908d2bcbc183fd1f89816 libs/spigot-api-1.20.2-R0.1-SNAPSHOT.jar
diff --git a/.github/scripts/prepare-release.sh b/.github/scripts/prepare-release.sh
index b7a1030..f6856fe 100644
--- a/.github/scripts/prepare-release.sh
+++ b/.github/scripts/prepare-release.sh
@@ -6,5 +6,4 @@ 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/d52cc0c734a9/MMOCore-1.11.3.jar?ref=$ref" > "libs/MMOCore-1.11.3.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/97e0c708c1e3/spigot-api-1.20.2-R0.1-SNAPSHOT.jar?ref=$ref" > "libs/spigot-api-1.20.2-R0.1-SNAPSHOT.jar"
sha256sum --check .github/dependencies.sha256
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 66b7bea..1a7a55c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-java@v6
with:
distribution: temurin
- java-version: '25'
+ java-version: '21'
- name: Prepare pinned dependencies
env:
GH_TOKEN: ${{ secrets.DEPS_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 45f6a03..35f6c90 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -13,7 +13,7 @@ jobs:
contents: write
uses: ./.github/workflows/maven-release.yml
with:
- java-version: '25'
+ java-version: '21'
# Exact path, not a glob. {version} is replaced with the tag without v.
artifact-path: target/advancedgunpowder-{version}.jar
secrets:
diff --git a/pom.xml b/pom.xml
index 7fa850d..dc2d327 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,10 +9,16 @@
1.5.0
- 17
- 17
+ 21
+
+
+ spigot-snapshots
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+
local
@@ -36,11 +42,10 @@
${project.basedir}/libs/MythicLib-1.7.jar
- local
+ org.spigotmc
spigot-api
- 1.20.2-R0.1-SNAPSHOT
- system
- ${project.basedir}/libs/spigot-api-1.20.2-R0.1-SNAPSHOT.jar
+ 1.21.10-R0.1-SNAPSHOT
+ provided
@@ -58,6 +63,11 @@
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.14.1
+
diff --git a/src/main/java/me/Plugins/AdvancedGunpowder/GunpowderEvents.java b/src/main/java/me/Plugins/AdvancedGunpowder/GunpowderEvents.java
index b7c1cc8..f50b773 100644
--- a/src/main/java/me/Plugins/AdvancedGunpowder/GunpowderEvents.java
+++ b/src/main/java/me/Plugins/AdvancedGunpowder/GunpowderEvents.java
@@ -83,7 +83,7 @@ public void equipEvent(PlayerItemHeldEvent e) {
loaded = nbtTags.getPersistentDataContainer().get(isLoaded, PersistentDataType.INTEGER);
}
if(loaded == 0) return;
- PotionEffect slow = new PotionEffect(PotionEffectType.SLOW, (int) Math.floor(w.getReloadTime()*20), 2, false, false);
+ PotionEffect slow = new PotionEffect(PotionEffectType.SLOWNESS, (int) Math.floor(w.getReloadTime()*20), 2, false, false);
p.addPotionEffect(slow);
isEquipping.put(p, true);
Double time = w.getEquipTime();
@@ -100,13 +100,13 @@ public void run()
p.sendTitle(" ", "§eEquipping... §7" + t/10 + "§es", 1, 20, 5);
} else {
p.sendTitle(" ", "§eEquipped!", 1, 20, 10);
- p.removePotionEffect(PotionEffectType.SLOW);
+ p.removePotionEffect(PotionEffectType.SLOWNESS);
isEquipping.put(p, false);
equippedItem.put(p, i);
this.cancel();
}
if(!p.getInventory().getItemInMainHand().equals(i) || isEquipping.get(p) == false) {
- p.removePotionEffect(PotionEffectType.SLOW);
+ p.removePotionEffect(PotionEffectType.SLOWNESS);
isEquipping.put(p, false);
this.cancel();
}
@@ -306,7 +306,7 @@ public void reloadMusket(HandWeapon w, ItemStack item, Player p) {
ItemMeta model = item.getItemMeta();
model.setCustomModelData(w.getLoadingModel());
item.setItemMeta(model);
- PotionEffect slow = new PotionEffect(PotionEffectType.SLOW, (int) Math.floor(w.getReloadTime())*20, 2, false, false);
+ PotionEffect slow = new PotionEffect(PotionEffectType.SLOWNESS, (int) Math.floor(w.getReloadTime())*20, 2, false, false);
p.addPotionEffect(slow);
isReloading.put(p, true);
Double time = w.getReloadTime();
@@ -344,13 +344,13 @@ public void run()
cbm.addChargedProjectile(new ItemStack(Material.ARROW, 1));
item.setItemMeta(cbm);
}
- p.removePotionEffect(PotionEffectType.SLOW);
+ p.removePotionEffect(PotionEffectType.SLOWNESS);
equippedItem.put(p, item);
isReloading.put(p, false);
this.cancel();
}
if(!p.getInventory().getItemInMainHand().equals(item)) {
- p.removePotionEffect(PotionEffectType.SLOW);
+ p.removePotionEffect(PotionEffectType.SLOWNESS);
isReloading.put(p, false);
ItemMeta model = item.getItemMeta();
model.setCustomModelData(w.getModel());
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index ffa8a6b..2b418b8 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,5 +1,5 @@
main: me.Plugins.AdvancedGunpowder.GunpowderMain
-api-version: 1.18
+api-version: '1.21.10'
name: AdvancedGunpowder
version: ${project.version}
author: Drefvelin