fixup load order for bPerms/bPerms2 and priority levels.

This commit is contained in:
Sleaker 2012-01-29 16:15:15 -08:00
parent 6cebf40386
commit d02fca42fe

View File

@ -34,6 +34,7 @@ import net.milkbowl.vault.chat.plugins.Chat_Permissions3;
import net.milkbowl.vault.chat.plugins.Chat_PermissionsEx;
import net.milkbowl.vault.chat.plugins.Chat_Towny;
import net.milkbowl.vault.chat.plugins.Chat_bPermissions;
import net.milkbowl.vault.chat.plugins.Chat_bPermissions2;
import net.milkbowl.vault.chat.plugins.Chat_iChat;
import net.milkbowl.vault.chat.plugins.Chat_mChat;
import net.milkbowl.vault.economy.Economy;
@ -151,6 +152,13 @@ public class Vault extends JavaPlugin {
log.info(String.format("[%s][Chat] mChat found: %s", getDescription().getName(), mChat.isEnabled() ? "Loaded" : "Waiting"));
}
//try loading bPermssions 2
if (packageExists(new String[] {"de.bananaco.bpermissions.api.ApiLayer"})) {
Chat bPerms = new Chat_bPermissions2(this, perms);
sm.register(Chat.class, bPerms, this, ServicePriority.High);
log.info(String.format("[%s][Chat] bPermissions2 found: %s", getDescription().getName(), bPerms.isEnabled() ? "Loaded" : "Waiting"));
}
//try loading bPermissions
if (packageExists(new String[] {"de.bananaco.permissions.info.InfoReader"})) {
Chat bPerms = new Chat_bPermissions(this, perms);
@ -322,13 +330,6 @@ public class Vault extends JavaPlugin {
log.info(String.format("[%s][Chat] bPermissions found: %s", getDescription().getName(), bPerms.isEnabled() ? "Loaded" : "Waiting"));
}
//Try to load bPermissions
if (packageExists(new String[] {"de.bananaco.permissions.SuperPermissionHandler"})) {
Permission bPerms = new Permission_bPermissions(this);
sm.register(Permission.class, bPerms, this, ServicePriority.Highest);
log.info(String.format("[%s][Permission] bPermissions found: %s", getDescription().getName(), bPerms.isEnabled() ? "Loaded" : "Waiting"));
}
//Try to load zPermission
if (packageExists(new String[] {"org.tyrannyofheaven.bukkit.zPermissions"})) {
Permission zPerms = new Permission_zPermissions(this);
@ -336,6 +337,13 @@ public class Vault extends JavaPlugin {
log.info(String.format("[%s][Permission] GroupManager found: %s", getDescription().getName(), zPerms.isEnabled() ? "Loaded" : "Waiting"));
}
//Try to load bPermissions
if (packageExists(new String[] {"de.bananaco.permissions.SuperPermissionHandler"})) {
Permission bPerms = new Permission_bPermissions(this);
sm.register(Permission.class, bPerms, this, ServicePriority.High);
log.info(String.format("[%s][Permission] bPermissions found: %s", getDescription().getName(), bPerms.isEnabled() ? "Loaded" : "Waiting"));
}
// Try to load GroupManager
if (packageExists(new String[] { "org.anjocaido.groupmanager.GroupManager" })) {
Permission gPerms = new Permission_GroupManager(this);