Skip to content
This repository was archived by the owner on Sep 23, 2026. It is now read-only.
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
1 change: 0 additions & 1 deletion .github/dependencies.sha256
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
c84700df5942fd969d3e8c2f1ad2c3ebeb17987ef88b426408d1306e49c4aada libs/MMOItems-6.10.jar
660ff2a6ec86bc8d7779948cf65c1637e271a16e1ef812d6a273f4a5c5eec73c libs/MythicLib-1.7.jar
97e0c708c1e319189ce1cda049244551a105860d51e908d2bcbc183fd1f89816 libs/spigot-api-1.20.2-R0.1-SNAPSHOT.jar
1 change: 0 additions & 1 deletion .github/scripts/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ ref=2fe025eb9879bab7dfe48e32395d8a8c1dff75f7
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/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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/goldsmithing-{version}.jar
secrets:
Expand Down
22 changes: 16 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@
<version>2.0</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>21</maven.compiler.release>
</properties>

<repositories>
<repository>
<id>spigot-snapshots</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>local</groupId>
Expand All @@ -29,11 +35,10 @@
<systemPath>${project.basedir}/libs/MythicLib-1.7.jar</systemPath>
</dependency>
<dependency>
<groupId>local</groupId>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/spigot-api-1.20.2-R0.1-SNAPSHOT.jar</systemPath>
<version>1.21.10-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

Expand All @@ -51,6 +56,11 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.1</version>
</plugin>
</plugins>
</build>

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/me/Plugins/Goldsmithing/SmithingEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void smithHitEvent(PlayerInteractEvent e) {
if(nbt.getType().equalsIgnoreCase(brandingType) && nbt.getString("MMOITEMS_ITEM_ID").equalsIgnoreCase(brandingID)) {
if(t.getCurrentHits() > 2 || t.getCurrentSmallHits() > 2 || t.getCurrentTinkerHits() > 2) {
BlockData blockDustData = Material.GOLD_BLOCK.createBlockData();
t.getLocation().getWorld().spawnParticle(Particle.BLOCK_DUST, t.getLocation(), 20, blockDustData);
t.getLocation().getWorld().spawnParticle(Particle.BLOCK, t.getLocation(), 20, blockDustData);
p.getWorld().playSound(p.getLocation(), Sound.BLOCK_ANVIL_LAND, 0.4f, 1);
Integer level = 3;
if(getSmithingPercentage(p, t) >= 100.0) {
Expand Down Expand Up @@ -150,7 +150,7 @@ public void smithHitEvent(PlayerInteractEvent e) {
if(t.getCurrentGoldItems().equals(t.getMaxGoldItems()) && t.getCurrentJewelItems().equals(t.getMaxJewelItems())) {
t.setCurrentHits(t.getCurrentHits()+1);
BlockData blockDustData = Material.GOLD_BLOCK.createBlockData();
t.getLocation().getWorld().spawnParticle(Particle.BLOCK_DUST, t.getLocation(), 20, blockDustData);
t.getLocation().getWorld().spawnParticle(Particle.BLOCK, t.getLocation(), 20, blockDustData);
p.getWorld().playSound(p.getLocation(), Sound.BLOCK_ANVIL_USE, 0.4f, 1);
p.sendTitle(" ", ChatColor.GRAY + " Current regular hits: " + ChatColor.YELLOW + t.getCurrentHits(), 1, 40, 20);
} else {
Expand All @@ -163,7 +163,7 @@ public void smithHitEvent(PlayerInteractEvent e) {
if(t.getCurrentGoldItems().equals(t.getMaxGoldItems()) && t.getCurrentJewelItems().equals(t.getMaxJewelItems())) {
t.setCurrentSmallHits(t.getCurrentSmallHits()+1);
BlockData blockDustData = Material.GOLD_BLOCK.createBlockData();
t.getLocation().getWorld().spawnParticle(Particle.BLOCK_DUST, t.getLocation(), 20, blockDustData);
t.getLocation().getWorld().spawnParticle(Particle.BLOCK, t.getLocation(), 20, blockDustData);
p.getWorld().playSound(p.getLocation(), Sound.BLOCK_ANVIL_USE, 0.7f, 2);
p.sendTitle(" ", ChatColor.GRAY + " Current small hits: " + ChatColor.YELLOW + t.getCurrentSmallHits(), 1, 40, 20);
} else {
Expand All @@ -176,7 +176,7 @@ public void smithHitEvent(PlayerInteractEvent e) {
if(t.getCurrentGoldItems().equals(t.getMaxGoldItems()) && t.getCurrentJewelItems().equals(t.getMaxJewelItems())) {
t.setCurrentTinkerHits(t.getCurrentTinkerHits()+1);
BlockData blockDustData = Material.GOLD_BLOCK.createBlockData();
t.getLocation().getWorld().spawnParticle(Particle.BLOCK_DUST, t.getLocation(), 20, blockDustData);
t.getLocation().getWorld().spawnParticle(Particle.BLOCK, t.getLocation(), 20, blockDustData);
p.getWorld().playSound(p.getLocation(), Sound.BLOCK_ANVIL_LAND, 0.7f, 2);
p.sendTitle(" ", ChatColor.GRAY + " Current tinker hits: " + ChatColor.YELLOW + t.getCurrentTinkerHits(), 1, 40, 20);
} else {
Expand Down Expand Up @@ -209,7 +209,7 @@ public void addItemEvent(PlayerInteractEvent e) {
}
item.setAmount(item.getAmount()-1);
BlockData blockDustData = Material.GOLD_BLOCK.createBlockData();
t.getLocation().getWorld().spawnParticle(Particle.BLOCK_DUST, t.getLocation(), 10, blockDustData);
t.getLocation().getWorld().spawnParticle(Particle.BLOCK, t.getLocation(), 10, blockDustData);
p.getWorld().playSound(p.getLocation(), Sound.ITEM_AXE_WAX_OFF, 0.7f, 2);
t.setCurrentGoldItems(t.getCurrentGoldItems()+1);
p.sendTitle(" ", ChatColor.GOLD + "Gold " + ChatColor.GRAY + " ingredients: " + ChatColor.YELLOW + t.getCurrentGoldItems() + "/" + t.getMaxGoldItems(), 1, 40, 20);
Expand All @@ -221,7 +221,7 @@ public void addItemEvent(PlayerInteractEvent e) {
}
item.setAmount(item.getAmount()-1);
BlockData blockDustData = Material.AMETHYST_BLOCK.createBlockData();
t.getLocation().getWorld().spawnParticle(Particle.BLOCK_DUST, t.getLocation(), 10, blockDustData);
t.getLocation().getWorld().spawnParticle(Particle.BLOCK, t.getLocation(), 10, blockDustData);
p.getWorld().playSound(p.getLocation(), Sound.ITEM_AXE_WAX_OFF, 0.7f, 2);
t.setCurrentJewelItems(t.getCurrentJewelItems()+1);
p.sendTitle(" ", ChatColor.LIGHT_PURPLE + "Jewel " + ChatColor.GRAY + " ingredients: " + ChatColor.YELLOW + t.getCurrentJewelItems() + "/" + t.getMaxJewelItems(), 1, 40, 20);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
main: me.Plugins.Goldsmithing.Goldsmithing
api-version: 1.18
api-version: '1.21.10'
name: Goldsmithing
version: ${project.version}
author: Drefvelin
Expand Down