Use SuperPerms if "Permissions" plugin isn't found

This commit is contained in:
Evenprime 2011-08-23 22:42:36 +02:00
parent 911d62a411
commit 6d0da77e7d
2 changed files with 6 additions and 2 deletions

View File

@ -3,7 +3,7 @@ name: NoCheat
author: Evenprime
main: cc.co.evenprime.bukkit.nocheat.NoCheat
version: 1.14d
version: 1.14e
softdepend: [ Permissions, CraftIRC ]

View File

@ -171,6 +171,9 @@ public class NoCheat extends JavaPlugin {
if(!useNewPermissionSystem) {
setupPermissions();
}
else {
Logger.getLogger("Minecraft").info("[NoCheat] is using SuperPerms system.");
}
setupIRC();
Logger.getLogger("Minecraft").info("[NoCheat] version [" + pdfFile.getVersion() + "] is enabled with the following checks: " + getActiveChecksAsString());
@ -255,7 +258,8 @@ public class NoCheat extends JavaPlugin {
this.permissions = ((Permissions) permissionsPlugin).getHandler();
} else {
PluginDescriptionFile pdfFile = this.getDescription();
Logger.getLogger("Minecraft").warning("[NoCheat] version [" + pdfFile.getVersion() + "] couldn't find Permissions plugin. Fallback to 'isOp()' equals 'nocheat.*'");
Logger.getLogger("Minecraft").warning("[NoCheat] version [" + pdfFile.getVersion() + "] couldn't find \"Permissions\" plugin. Falling back to SuperPerms system.");
useNewPermissionSystem = true;
}
}
}