Skip to content

Commit 5437f2d

Browse files
committed
Fix Vault hooks
1 parent 60b78dc commit 5437f2d

File tree

1 file changed

+5
-6
lines changed
  • spigot/src/main/java/com/github/fernthedev/fernapi/server/spigot/pluginhandlers

1 file changed

+5
-6
lines changed

spigot/src/main/java/com/github/fernthedev/fernapi/server/spigot/pluginhandlers/VaultHandler.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ public class VaultHandler {
2222
* No need to manually call it.
2323
*/
2424
public void hook() {
25+
if (getServer().getPluginManager().getPlugin("Vault") == null) {
26+
return;
27+
}
28+
2529
if (!hooked) {
26-
if (!setupEconomy()) {
27-
return;
28-
}
30+
setupEconomy();
2931
setupPermissions();
3032
setupChat();
3133
hooked = true;
@@ -42,9 +44,6 @@ public void hook() {
4244
private static Chat chat = null;
4345

4446
private boolean setupEconomy() {
45-
if (getServer().getPluginManager().getPlugin("Vault") == null) {
46-
return false;
47-
}
4847
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
4948
if (rsp == null) {
5049
return false;

0 commit comments

Comments
 (0)