mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-09-30 07:37:34 +02:00
Adds try around Vault hook.
https://github.com/BentoBoxWorld/BentoBox/issues/938
This commit is contained in:
parent
5c1824050a
commit
65e4868641
@ -23,12 +23,16 @@ public class VaultHook extends Hook {
|
||||
|
||||
@Override
|
||||
public boolean hook() {
|
||||
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
|
||||
if (rsp == null) {
|
||||
try {
|
||||
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
|
||||
if (rsp == null) {
|
||||
return false;
|
||||
}
|
||||
economy = rsp.getProvider();
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
economy = rsp.getProvider();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user