From 20448b7a660080910541f394aa04cd53e7c0ebb6 Mon Sep 17 00:00:00 2001 From: Apleax <3220923564@qq.com> Date: Mon, 4 Nov 2024 19:57:20 +0800 Subject: [PATCH 1/3] Vault2.java --- .../cn/lunadeer/dominion/utils/VaultConnect/Vault2.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java b/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java index b0dd29e7..ac86449a 100644 --- a/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java +++ b/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java @@ -12,12 +12,14 @@ public class Vault2 implements VaultInterface { private Economy econ = null; - + private String PluginName = null; + @Override public boolean init(JavaPlugin plugin) { RegisteredServiceProvider rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class); if (rsp != null) { econ = rsp.getProvider(); + PluginName = plugin.getName(); return true; } XLogger.err(Localization.Utils_VaultUnlockedNotAvailable); @@ -26,12 +28,12 @@ public boolean init(JavaPlugin plugin) { @Override public String currencyNamePlural() { - return econ.defaultCurrencyNamePlural(); + return econ.defaultCurrencyNamePlural(PluginName); } @Override public String currencyNameSingular() { - return econ.defaultCurrencyNameSingular(); + return econ.defaultCurrencyNameSingular(PluginName); } @Override From 7439467d22b1aae75fc902e3e5433d5ec9d927ba Mon Sep 17 00:00:00 2001 From: Apleax <3220923564@qq.com> Date: Mon, 4 Nov 2024 20:53:53 +0800 Subject: [PATCH 2/3] Vault2.java --- .../cn/lunadeer/dominion/utils/VaultConnect/Vault2.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java b/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java index ac86449a..a651acb2 100644 --- a/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java +++ b/core/src/main/java/cn/lunadeer/dominion/utils/VaultConnect/Vault2.java @@ -38,16 +38,16 @@ public String currencyNameSingular() { @Override public void withdrawPlayer(Player player, double amount) { - econ.withdraw("MPU", player.getUniqueId(), BigDecimal.valueOf(amount)); + econ.withdraw(PluginName, player.getUniqueId(), BigDecimal.valueOf(amount)); } @Override public void depositPlayer(Player player, double amount) { - econ.deposit("MPU", player.getUniqueId(), BigDecimal.valueOf(amount)); + econ.deposit(PluginName, player.getUniqueId(), BigDecimal.valueOf(amount)); } @Override public double getBalance(Player player) { - return econ.getBalance("MPU", player.getUniqueId()).doubleValue(); + return econ.getBalance(PluginName, player.getUniqueId()).doubleValue(); } } From 0c628e556a3a5f0b66f14b27dc8252088f8979ee Mon Sep 17 00:00:00 2001 From: Apleax <3220923564@qq.com> Date: Mon, 4 Nov 2024 21:10:08 +0800 Subject: [PATCH 3/3] Update build.gradle.kts --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 26654766..b0373bcb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,7 +42,7 @@ allprojects { compileOnly("us.dynmap:DynmapCoreAPI:3.4") compileOnly("me.clip:placeholderapi:2.11.6") compileOnly("com.github.MilkBowl:VaultAPI:1.7") - compileOnly("net.milkbowl.vault:VaultUnlockedAPI:2.2") + compileOnly("net.milkbowl.vault:VaultUnlockedAPI:2.7") if (!BuildFull) { libraries.forEach { @@ -123,4 +123,4 @@ hangarPublish { tasks.named("publishPluginPublicationToHangar") { dependsOn(tasks.named("jar")) -} \ No newline at end of file +}