This commit is contained in:
Jeremy Wood 2012-11-05 09:05:11 -05:00
parent d01ce71343
commit 63f8811b67
1 changed files with 13 additions and 11 deletions

View File

@ -18,7 +18,7 @@ public class VaultHandler implements Listener {
private Economy economy;
public VaultHandler(final Plugin plugin) {
Bukkit.getPluginManager().registerEvents(this, plugin);
Bukkit.getPluginManager().registerEvents(new VaultListener(), plugin);
setupVaultEconomy();
}
@ -41,6 +41,7 @@ public class VaultHandler implements Listener {
return (economy != null);
}
private class VaultListener implements Listener {
@EventHandler
private void vaultEnabled(PluginEnableEvent event) {
if (event.getPlugin() != null && event.getPlugin().getName().equals("Vault")) {
@ -55,6 +56,7 @@ public class VaultHandler implements Listener {
setupVaultEconomy();
}
}
}
/**
* Returns the Vault economy system if Vault is present and has an economy system enabled.