mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-12 18:31:56 +01: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
|
@Override
|
||||||
public boolean hook() {
|
public boolean hook() {
|
||||||
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
|
try {
|
||||||
if (rsp == null) {
|
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
|
||||||
|
if (rsp == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
economy = rsp.getProvider();
|
||||||
|
return true;
|
||||||
|
} catch (Exception e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
economy = rsp.getProvider();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user