From 90b2a117b46a7b0cb27787e36eb77c6a9d6088fb Mon Sep 17 00:00:00 2001
From: Tenkuma <85490958+adrianvic@users.noreply.github.com>
Date: Sun, 4 Jan 2026 00:21:24 -0300
Subject: [PATCH 1/6] Cleaned up README.md
Configuration section now links to config file from GH tree.
---
README.md | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index 23e865b..1448468 100644
--- a/README.md
+++ b/README.md
@@ -3,32 +3,25 @@
-ItemEconomy II is a fork of [ItemEconomy](https://modrinth.com/plugin/itemeconomy), keeping it updated to later versions of Minecraft and adding new features.
+**ItemEconomy II** is a fork of [ItemEconomy](https://modrinth.com/plugin/itemeconomy), keeping it updated to later versions of Minecraft and adding new features.
This PaperMC plugin integrates with VaultUnlocked to provide a unique, item-based economy system for your Minecraft server. Instead of relying solely on virtual balances, players use in-game items as physical currency, adding a layer of immersion and realism to your economy.
-Features:
-- **Item-Based Currency:** Set any Minecraft item as your server's currency (default: diamonds).
+ItemEconomy is as powerful as you need and as simple as you want, with every feature being optional.
+
+## Features
+- **Item-Based Currency:** Set any Minecraft item as your server's currency (diamonds by default).
- **VaultUnlocked Integration:** Fully compatible with VaultUnlocked, enabling seamless interaction with other economy-based plugins.
- **Simple logic:** Just checks if the user has the item/how many when queried.
- **Customizable Formatting:** Define how your currency is displayed, including singular and plural forms.
- **Ender Chest support:** Items on Ender Chests are counted in the user balance.
- **Built-int optional balance and pay commands** with support for permissions.
+- **Translation support** with per-user language and per-language currency name.
-## Configuration Example:
-```yaml
-item: diamond # Define the item to be used as currency.
-singular: diamond # Singular form of the currency.
-plural: diamonds # Plural form of the currency.
-format: "{} $" # {} will be replaced with the amount and $ either with singular or plural
-ender_chest: balance # Either none or balance
-commands: true # Disabling this will disable /balance and /pay
-```
-
-This configuration will use diamonds as the currency, displayed as {amount} {name}, e.g., "5 diamonds" or "1 diamond".
-
-## Usage:
+## Configuration
+An updated example configuration file is available [here](https://github.com/adrianvic/ItemEconomy/blob/main/src/main/resources/config.yml).
+## Usage
- Players can earn, trade, and store the configured item as physical currency.
-- Integrates seamlessly with Vault-compatible plugins for shops, auctions, and more.
+- Once they spend the currency, that amount of the item will be subtracted from their inventory.
- Administrators can customize the item and formatting to match their server's theme.
From 7e3edff269ce3e256735bec907b09ebe390d1788 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=A9=E3=82=AF=E3=83=9E?=
<85490958+adrianvic@users.noreply.github.com>
Date: Tue, 19 May 2026 19:26:12 -0300
Subject: [PATCH 2/6] Update README.md to include commands
Closes #1
---
README.md | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/README.md b/README.md
index 1448468..0af72de 100644
--- a/README.md
+++ b/README.md
@@ -25,3 +25,13 @@ An updated example configuration file is available [here](https://github.com/adr
- Players can earn, trade, and store the configured item as physical currency.
- Once they spend the currency, that amount of the item will be subtracted from their inventory.
- Administrators can customize the item and formatting to match their server's theme.
+
+## Commands
+
+ - /balance
+ - Prints player balance, permission is `iteco.balance` but is allowed by default. Requires permission `iteco.balance.others` to specify other user.
+- /pay
+- Transfers money from your account to another player's, permission is `iteco.pay` but is allowed by default.
+- /itecoreload
+- Reloads the plugin configuration, requires permission `iteco.reload`.
+
From f65c3ddc97e32fcaaf109accaad59c11f273f940 Mon Sep 17 00:00:00 2001
From: Adrian Victor
Date: Tue, 19 May 2026 19:41:07 -0300
Subject: [PATCH 3/6] Fix bug where Main.addItems would try to add 0 items to
Ender Chest. Bumped version to `1.2.1`.
---
.../io/github/adrianvic/itemeconomy/Main.java | 18 +++++++++++++++---
src/main/resources/plugin.yml | 2 +-
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/main/java/io/github/adrianvic/itemeconomy/Main.java b/src/main/java/io/github/adrianvic/itemeconomy/Main.java
index bb524d2..3b999ee 100644
--- a/src/main/java/io/github/adrianvic/itemeconomy/Main.java
+++ b/src/main/java/io/github/adrianvic/itemeconomy/Main.java
@@ -122,12 +122,24 @@ public class Main extends JavaPlugin {
}
public static void addItems(Player player, Material type, int amount) {
- HashMap invOverflow = getInventory(player, InventoryID.INVENTORY).addItem(new ItemStack(type, amount));
- HashMap echestOverflow = getInventory(player, InventoryID.ENDER_CHEST).addItem(new ItemStack(type, invOverflow.values()
+ if (amount <= 0) return;
+
+ HashMap invOverflow =
+ getInventory(player, InventoryID.INVENTORY)
+ .addItem(new ItemStack(type, amount));
+
+ int overflowAmount = invOverflow.values()
.stream()
.mapToInt(ItemStack::getAmount)
- .sum()));
+ .sum();
+ if (overflowAmount <= 0) {
+ return;
+ }
+
+ HashMap echestOverflow =
+ getInventory(player, InventoryID.ENDER_CHEST)
+ .addItem(new ItemStack(type, overflowAmount));
for (ItemStack overflow : echestOverflow.values()) {
player.getWorld().dropItemNaturally(player.getLocation(), overflow);
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index e78d2d1..02fae9e 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
name: ItemEconomy
main: io.github.adrianvic.itemeconomy.Main
-version: 1.2
+version: 1.2.1
depend: [Vault]
api-version: '1.21'
commands:
From 1259cd874ec50a378e7d196a27c924bf819a45df Mon Sep 17 00:00:00 2001
From: Adrian Victor
Date: Tue, 19 May 2026 19:48:01 -0300
Subject: [PATCH 4/6] Add messages to reload command
---
src/main/java/io/github/adrianvic/itemeconomy/Messages.java | 6 +++++-
.../io/github/adrianvic/itemeconomy/commands/Reload.java | 4 ++++
src/main/resources/messages.properties | 5 ++++-
src/main/resources/messages_en.properties | 5 ++++-
src/main/resources/messages_pt.properties | 5 ++++-
5 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/main/java/io/github/adrianvic/itemeconomy/Messages.java b/src/main/java/io/github/adrianvic/itemeconomy/Messages.java
index d9ee83c..33102ce 100644
--- a/src/main/java/io/github/adrianvic/itemeconomy/Messages.java
+++ b/src/main/java/io/github/adrianvic/itemeconomy/Messages.java
@@ -17,7 +17,11 @@ public enum Messages {
PAY_COULD_NOT_REALIZE_TRANSACTION("pay-could-not-realize-transaction"),
PAY_COULD_NOT_FIND_TARGET("pay-could-not-find-target"),
PAY_NOT_ENOUGH_MONEY("pay-not-enough-money"),
- PAY_INVALID_AMOUNT("pay-invalid-amount");
+ PAY_INVALID_AMOUNT("pay-invalid-amount"),
+ RELOADING("reloading"),
+ RELOAD_ERROR("reload-error"),
+ RELOAD_FINISHED("reload-finished");
+
private final String path;
Messages(String path) { this.path = path; }
diff --git a/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java b/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java
index 804e6ed..4e5ff26 100644
--- a/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java
+++ b/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java
@@ -2,6 +2,7 @@ package io.github.adrianvic.itemeconomy.commands;
import io.github.adrianvic.itemeconomy.Config;
import io.github.adrianvic.itemeconomy.Main;
+import io.github.adrianvic.itemeconomy.Messages;
import io.github.adrianvic.itemeconomy.UnrealConfig;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
@@ -13,9 +14,12 @@ public class Reload implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String @NotNull [] strings) {
try {
+ commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOADING));
Config.loadConfig(new UnrealConfig(Main.getInstance(), Main.getInstance().getDataFolder(), "config.yml"));
+ commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOAD_FINISHED));
return true;
} catch (Exception e) {
+ commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOAD_ERROR));
return false;
}
}
diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties
index 8dde12e..77e17f5 100644
--- a/src/main/resources/messages.properties
+++ b/src/main/resources/messages.properties
@@ -7,4 +7,7 @@ pay-received=pay-received
pay-could-not-realize-transaction=pay-could-not-realize-transaction
pay-could-not-find-target=pay-could-not-find-target
pay-not-enough-money=pay-not-enough-money
-pay-invalid-amount=pay-invalid-amount
\ No newline at end of file
+pay-invalid-amount=pay-invalid-amount
+reloading=reloading
+reload-error=reload-error
+reload-finished=reload-finished
\ No newline at end of file
diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties
index 06b8422..ee946e3 100644
--- a/src/main/resources/messages_en.properties
+++ b/src/main/resources/messages_en.properties
@@ -7,4 +7,7 @@ pay-received=You received %s from %s.
pay-could-not-realize-transaction=Could not realize transaction: %s
pay-could-not-find-target=Could not find target player.
pay-not-enough-money=You don't have enough money.
-pay-invalid-amount=The amount you tried to pay is not valid.
\ No newline at end of file
+pay-invalid-amount=The amount you tried to pay is not valid.
+reloading=Reloading...
+reload-error=Reload complete.
+reload-finished=An error occurred while reloading the config, please check your logs.
\ No newline at end of file
diff --git a/src/main/resources/messages_pt.properties b/src/main/resources/messages_pt.properties
index 8b624b1..be1edbc 100644
--- a/src/main/resources/messages_pt.properties
+++ b/src/main/resources/messages_pt.properties
@@ -7,4 +7,7 @@ pay-received=Voc
pay-could-not-realize-transaction=Não foi possível realizar a transação: %s
pay-could-not-find-target=Não foi possível encontrar o jogador-alvo.
pay-not-enough-money=Você não tem dinheiro suficiente.
-pay-invalid-amount=A quantidade que você tentou enviar é inválida.
\ No newline at end of file
+pay-invalid-amount=A quantidade que você tentou enviar é inválida.
+reloading=Recarregando...
+reload-error=Carregamento completo.
+reload-finished=Ocorreu um erro ao recarregar, por favor, verifique seu registro.
\ No newline at end of file
From 97f16f98c739803c7992820eae7fce03262401fb Mon Sep 17 00:00:00 2001
From: Adrian Victor
Date: Tue, 19 May 2026 20:31:01 -0300
Subject: [PATCH 5/6] Fix messages in reload command
---
.gitignore | 1 +
build.gradle.kts | 2 +-
.../github/adrianvic/itemeconomy/commands/Reload.java | 10 +++++++---
src/main/resources/messages_en.properties | 4 ++--
src/main/resources/messages_pt.properties | 4 ++--
5 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9ede845..4c59a71 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ build/
out/
.idea/
libs/
+run/
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index bbc19a2..35e0edf 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -106,4 +106,4 @@ tasks.withType {
tasks.runServer {
minecraftVersion("1.21")
-}
+}
\ No newline at end of file
diff --git a/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java b/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java
index 4e5ff26..b0d8514 100644
--- a/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java
+++ b/src/main/java/io/github/adrianvic/itemeconomy/commands/Reload.java
@@ -9,17 +9,21 @@ import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
+import java.util.Locale;
+
public class Reload implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String @NotNull [] strings) {
+ Locale locale = Utils.localeOrDefault(commandSender);
try {
- commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOADING));
+ commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOADING.get(locale)));
Config.loadConfig(new UnrealConfig(Main.getInstance(), Main.getInstance().getDataFolder(), "config.yml"));
- commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOAD_FINISHED));
+ commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOAD_FINISHED.get(locale)));
return true;
} catch (Exception e) {
- commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOAD_ERROR));
+ commandSender.sendMessage("[ECONOMY] %s".formatted(Messages.RELOAD_ERROR.get(locale)));
+ e.printStackTrace();
return false;
}
}
diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties
index ee946e3..95f9873 100644
--- a/src/main/resources/messages_en.properties
+++ b/src/main/resources/messages_en.properties
@@ -9,5 +9,5 @@ pay-could-not-find-target=Could not find target player.
pay-not-enough-money=You don't have enough money.
pay-invalid-amount=The amount you tried to pay is not valid.
reloading=Reloading...
-reload-error=Reload complete.
-reload-finished=An error occurred while reloading the config, please check your logs.
\ No newline at end of file
+reload-error=An error occurred while reloading the config, please check your logs.
+reload-finished=Reload complete.
\ No newline at end of file
diff --git a/src/main/resources/messages_pt.properties b/src/main/resources/messages_pt.properties
index be1edbc..e11dc4c 100644
--- a/src/main/resources/messages_pt.properties
+++ b/src/main/resources/messages_pt.properties
@@ -9,5 +9,5 @@ pay-could-not-find-target=N
pay-not-enough-money=Você não tem dinheiro suficiente.
pay-invalid-amount=A quantidade que você tentou enviar é inválida.
reloading=Recarregando...
-reload-error=Carregamento completo.
-reload-finished=Ocorreu um erro ao recarregar, por favor, verifique seu registro.
\ No newline at end of file
+reload-error=Ocorreu um erro ao recarregar, por favor, verifique seu registro.
+reload-finished=Carregamento completo.
\ No newline at end of file
From 81f6f24affff20070faa4404c1ec26536ac054b4 Mon Sep 17 00:00:00 2001
From: Adrian Victor
Date: Tue, 19 May 2026 20:32:44 -0300
Subject: [PATCH 6/6] Bump to 1.3.1
---
src/main/resources/plugin.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 02fae9e..75cefe8 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
name: ItemEconomy
main: io.github.adrianvic.itemeconomy.Main
-version: 1.2.1
+version: 1.3.1
depend: [Vault]
api-version: '1.21'
commands: