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
12 changes: 12 additions & 0 deletions .github/scripts/install-local-dependencies.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
2 changes: 1 addition & 1 deletion .github/scripts/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
10 changes: 4 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@
<dependency>
<groupId>local</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/gson-2.10.1.jar</systemPath>
<version>2.10.1-tfmc-4241c14a7727</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>local</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/json-simple-1.1.jar</systemPath>
<version>1.1-tfmc-2d9484f4c649</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.plugins</groupId>
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/tfminecraft/pointshop/objects/Trade.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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");
Expand Down