File tree 1 file changed +6
-0
lines changed
core/src/main/java/be/isach/ultracosmetics/economy
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,19 @@ public class EconomyHandler {
16
16
17
17
public EconomyHandler (UltraCosmetics ultraCosmetics , String economy ) {
18
18
this .ultraCosmetics = ultraCosmetics ;
19
+ if (economy == null || economy .equalsIgnoreCase ("" )) {
20
+ ultraCosmetics .getSmartLogger ().write ("Economy not specified in the config, disabling economy features." );
21
+ usingEconomy = false ;
22
+ return ;
23
+ }
19
24
if (economy .equalsIgnoreCase ("vault" )) {
20
25
economyHook = new VaultHook (ultraCosmetics );
21
26
usingEconomy = true ;
22
27
} else if (economy .equalsIgnoreCase ("playerpoints" )) {
23
28
economyHook = new PlayerPointsHook (ultraCosmetics );
24
29
usingEconomy = true ;
25
30
} else {
31
+ ultraCosmetics .getSmartLogger ().write ("Unknown economy: '" + economy + "'. Valid economies: Vault, PlayerPoints." );
26
32
usingEconomy = false ;
27
33
}
28
34
}
You can’t perform that action at this time.
0 commit comments