more fixes

This commit is contained in:
Nick Minkler 2013-09-12 06:42:09 -07:00
parent 056824a466
commit 25c66d2491
2 changed files with 9 additions and 2 deletions

View File

@ -65,7 +65,7 @@ public class Chat_rscPermissions extends Chat {
if (plugin.getDescription().getName().equals("rscPermissions")) {
bridge.rscp = (MainPluginClass) plugin;
bridge.rscpAPI = bridge.rscp.API;
log.info(String.format("[%s][Permission] %s hooked.", vault.getDescription().getName(), "rscPermissions"));
log.info(String.format("[%s][Chat] %s hooked.", vault.getDescription().getName(), "rscPermissions"));
}
}
}

View File

@ -37,7 +37,14 @@ public class Permission_rscPermissions extends Permission {
super();
this.vault = plugin;
Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(this), vault);
rscp = (MainPluginClass)vault.getServer().getPluginManager().getPlugin("rscPermissions");
if (rscp == null) {
Plugin perms = plugin.getServer().getPluginManager().getPlugin("rscPermissions");
if (perms != null && perms.isEnabled()) {
this.rscp = (MainPluginClass) perms;
rscpAPI = rscp.API;
plugin.getLogger().info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), "rscPermissions"));
}
}
}
private class PermissionServerListener implements Listener {