mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +00:00
fixed NPE 🤦
reformat code using standard IntelliJ code style scheme RedisEconomy stable version
This commit is contained in:
1 parent
69e1a5e083
commit
ee7b6dc77c
3 files changed
+6
-5
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ dependencies {
|
|||||||
implementation 'io.papermc:paperlib:1.0.7'
|
implementation 'io.papermc:paperlib:1.0.7'
|
||||||
implementation 'me.lucko:commodore:2.2'
|
implementation 'me.lucko:commodore:2.2'
|
||||||
implementation 'net.kyori:adventure-platform-bukkit:4.1.2'
|
implementation 'net.kyori:adventure-platform-bukkit:4.1.2'
|
||||||
implementation 'com.github.Emibergo02:RedisEconomy:master-SNAPSHOT'
|
implementation 'com.github.Emibergo02:RedisEconomy:1.0-SNAPSHOT'
|
||||||
|
|
||||||
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
|
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
|
||||||
compileOnly 'org.jetbrains:annotations:23.0.0'
|
compileOnly 'org.jetbrains:annotations:23.0.0'
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ public class RedisEconomyHook extends VaultEconomyHook {
|
|||||||
public boolean initialize() throws HuskHomesInitializationException {
|
public boolean initialize() throws HuskHomesInitializationException {
|
||||||
RedisEconomyAPI api = RedisEconomyAPI.getAPI();
|
RedisEconomyAPI api = RedisEconomyAPI.getAPI();
|
||||||
if (api != null) {
|
if (api != null) {
|
||||||
economy=api.getCurrencyByName(plugin.getSettings().currencyName);
|
economy = api.getCurrencyByName(plugin.getSettings().redis_economy_name);
|
||||||
|
if (economy != null)
|
||||||
return true;
|
return true;
|
||||||
}else
|
}
|
||||||
return super.initialize();
|
return super.initialize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,8 +216,8 @@ public class Settings {
|
|||||||
public boolean economy = false;
|
public boolean economy = false;
|
||||||
|
|
||||||
@YamlComment("Use this currency for payments (works only with RedisEconomy), defaults to Vault currency")
|
@YamlComment("Use this currency for payments (works only with RedisEconomy), defaults to Vault currency")
|
||||||
@YamlKey("economy.currency")
|
@YamlKey("economy.currency_name")
|
||||||
public String currencyName="vault";
|
public String redis_economy_name = "vault";
|
||||||
|
|
||||||
@YamlKey("economy.free_home_slots")
|
@YamlKey("economy.free_home_slots")
|
||||||
public int freeHomeSlots = 5;
|
public int freeHomeSlots = 5;
|
||||||
|
|||||||
Reference in new issue
Block a user