File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/main/java/systems/kscott/randomspawnplus Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 55import net .ess3 .api .IEssentials ;
66import net .luckperms .api .LuckPerms ;
77import net .milkbowl .vault .economy .Economy ;
8- import org .bukkit .Bukkit ;
98import org .bukkit .configuration .file .FileConfiguration ;
109import org .bukkit .plugin .RegisteredServiceProvider ;
1110import org .bukkit .plugin .java .JavaPlugin ;
@@ -32,7 +31,7 @@ public final class RandomSpawnPlus extends JavaPlugin {
3231 private ConfigFile spawnsManager ;
3332
3433 @ Getter
35- private Economy economy ;
34+ private static Economy economy = null ;
3635
3736 @ Getter
3837 private LuckPerms luckPerms ;
@@ -126,13 +125,12 @@ private void setupPermissions() {
126125 luckPerms = rsp .getProvider ();
127126 }
128127
129- private void setupEconomy () throws Exception {
128+ private boolean setupEconomy () {
130129 RegisteredServiceProvider <Economy > rsp = getServer ().getServicesManager ().getRegistration (Economy .class );
131130 if (rsp == null ) {
132- throw new Exception ( "Error when loading the Vault API" ) ;
131+ return false ;
133132 }
134133 economy = rsp .getProvider ();
134+ return economy != null ;
135135 }
136-
137-
138136}
You can’t perform that action at this time.
0 commit comments