mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-05 02:10:33 +01:00
Fix a bug with Vault Economy not found in loading process.
If plugin that enables Vault do it after BentoBox, then a lot of addons disabled their economy settings. This should fix it.
This commit is contained in:
parent
e6f82937c0
commit
27d10f2d16
@ -57,11 +57,6 @@ public class ChallengesAddon extends Addon {
|
||||
|
||||
private boolean hooked;
|
||||
|
||||
/**
|
||||
* This boolean indicate if economy is enabled.
|
||||
*/
|
||||
private boolean economyProvided;
|
||||
|
||||
/**
|
||||
* VaultHook that process economy.
|
||||
*/
|
||||
@ -219,11 +214,10 @@ public class ChallengesAddon extends Addon {
|
||||
if (!vault.isPresent() || !vault.get().hook())
|
||||
{
|
||||
this.vaultHook = null;
|
||||
this.logWarning("Economy plugin not found so money options will not work!");
|
||||
this.logWarning("Vault plugin not found. Economy will not work!");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.economyProvided = true;
|
||||
this.vaultHook = vault.get();
|
||||
}
|
||||
|
||||
@ -531,7 +525,7 @@ public class ChallengesAddon extends Addon {
|
||||
*/
|
||||
public boolean isEconomyProvided()
|
||||
{
|
||||
return this.economyProvided;
|
||||
return this.vaultHook != null && this.vaultHook.hook();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user