From 7aec5aaa2ad85c88d5082e940f364f7cd31a4413 Mon Sep 17 00:00:00 2001
From: Ryan Barlow <7389646+ryanbarlow97@users.noreply.github.com>
Date: Tue, 22 Sep 2026 23:35:52 +0000
Subject: [PATCH] fix: resolve build warnings
---
.github/scripts/install-local-dependencies.sh | 12 ++++++++++++
.github/scripts/prepare-release.sh | 2 +-
pom.xml | 10 ++++------
.../net/tfminecraft/pointshop/objects/Trade.java | 3 +--
4 files changed, 18 insertions(+), 9 deletions(-)
create mode 100644 .github/scripts/install-local-dependencies.sh
diff --git a/.github/scripts/install-local-dependencies.sh b/.github/scripts/install-local-dependencies.sh
new file mode 100644
index 0000000..0e6362b
--- /dev/null
+++ b/.github/scripts/install-local-dependencies.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -euo pipefail
+# Run from the repository root after downloading the pinned JARs.
+# Hash-qualified versions prevent different private JARs sharing a Maven cache key.
+sha256sum --check .github/dependencies.sha256
+
+mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \
+ -Dfile="libs/gson-2.10.1.jar" -DgroupId="local" -DartifactId="gson" \
+ -Dversion="2.10.1-tfmc-4241c14a7727" -Dpackaging=jar -DgeneratePom=true "$@"
+mvn -B --no-transfer-progress org.apache.maven.plugins:maven-install-plugin:3.1.4:install-file \
+ -Dfile="libs/json-simple-1.1.jar" -DgroupId="local" -DartifactId="json-simple" \
+ -Dversion="1.1-tfmc-2d9484f4c649" -Dpackaging=jar -DgeneratePom=true "$@"
diff --git a/.github/scripts/prepare-release.sh b/.github/scripts/prepare-release.sh
index b602fa2..d41f5a2 100644
--- a/.github/scripts/prepare-release.sh
+++ b/.github/scripts/prepare-release.sh
@@ -5,4 +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/4241c14a7727/gson-2.10.1.jar?ref=$ref" > "libs/gson-2.10.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/2d9484f4c649/json-simple-1.1.jar?ref=$ref" > "libs/json-simple-1.1.jar"
-sha256sum --check .github/dependencies.sha256
+bash .github/scripts/install-local-dependencies.sh "$@"
diff --git a/pom.xml b/pom.xml
index 0944a61..bfd39fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,16 +24,14 @@
local
gson
- 2.10.1
- system
- ${project.basedir}/libs/gson-2.10.1.jar
+ 2.10.1-tfmc-4241c14a7727
+ provided
local
json-simple
- 1.1
- system
- ${project.basedir}/libs/json-simple-1.1.jar
+ 1.1-tfmc-2d9484f4c649
+ provided
me.plugins
diff --git a/src/main/java/net/tfminecraft/pointshop/objects/Trade.java b/src/main/java/net/tfminecraft/pointshop/objects/Trade.java
index a677aed..4ae9bc4 100644
--- a/src/main/java/net/tfminecraft/pointshop/objects/Trade.java
+++ b/src/main/java/net/tfminecraft/pointshop/objects/Trade.java
@@ -4,7 +4,6 @@
import org.bukkit.inventory.ItemStack;
import net.tfminecraft.tlibs.TLibs;
-import net.tfminecraft.tlibs.enums.APIType;
import net.tfminecraft.tlibs.objects.api.ItemAPI;
import net.tfminecraft.pointshop.loaders.PointLoader;
@@ -25,7 +24,7 @@ public class Trade {
public Trade(String key, ConfigurationSection config) {
this.id = key;
- ItemAPI api = (ItemAPI) TLibs.getApiInstance(APIType.ITEM_API);
+ ItemAPI api = TLibs.getItemAPI();
this.menuItem = api.getCreator().getItemFromConfig(config.getConfigurationSection("item"));
this.type = PointLoader.getByString(config.getString("type"));
this.cost = config.getInt("cost");