You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewIllegalStateException("Default currency '" + defaultCurrency + "' not found in config. Check 'data.default-currency' and 'currencies' in config.yml.");
56
+
}
57
+
returncurrency;
54
58
}
55
59
56
60
// 获取特定货币的信息
57
61
publicCurrencygetCurrency(Stringname) {
58
-
returncurrencies.get(name);
62
+
Currencycurrency = currencies.get(name);
63
+
if (currency == null) {
64
+
thrownewIllegalArgumentException("Currency '" + name + "' not found in config. Available currencies: " + currencies.keySet());
Copy file name to clipboardExpand all lines: src/main/java/me/onebone/economyapi/config/UpgradeConfig.java
+24-17Lines changed: 24 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -51,8 +51,9 @@ public static boolean updateDoubleConfirmation() {
51
51
if (newScanner(System.in).nextLine().toLowerCase().startsWith("y")) {
52
52
System.out.println("User confirmed the upgrade. Starting the upgrade process...");
53
53
} else {
54
-
System.out.println("The plugin version is too high and does not support this configuration file. Please use version 2.0.6 of EconomyAPI!");
55
-
System.exit(1);
54
+
EconomyAPI.getInstance().getLogger().warning("The plugin version is too high and does not support this configuration file. Please use version 2.0.6 of EconomyAPI!");
0 commit comments