only enable RegisterToVault option if Register can't hook the economy

itself.  This allows non-Register compatible economies to work with
Register.
This commit is contained in:
Sleaker 2012-01-15 17:15:05 -08:00
parent e4896477c2
commit 02c4e0b22c

View File

@ -477,6 +477,7 @@ public class Vault extends JavaPlugin {
@Override @Override
public void onPluginEnable(PluginEnableEvent event) { public void onPluginEnable(PluginEnableEvent event) {
if (event.getPlugin().getDescription().getName().equals("Register")) { if (event.getPlugin().getDescription().getName().equals("Register")) {
if (!Methods.hasMethod()) {
try { try {
Method m = Methods.class.getMethod("addMethod", Methods.class); Method m = Methods.class.getMethod("addMethod", Methods.class);
m.setAccessible(true); m.setAccessible(true);
@ -499,7 +500,7 @@ public class Vault extends JavaPlugin {
} }
} }
} }
}
} }
} }