diff --git a/lib/bukkit-0.0.1-SNAPSHOT.jar b/lib/bukkit-0.0.1-SNAPSHOT.jar index 86260175..011a54e6 100644 Binary files a/lib/bukkit-0.0.1-SNAPSHOT.jar and b/lib/bukkit-0.0.1-SNAPSHOT.jar differ diff --git a/src/org/mcteam/factions/Factions.java b/src/org/mcteam/factions/Factions.java index 719e605f..6e3c5882 100644 --- a/src/org/mcteam/factions/Factions.java +++ b/src/org/mcteam/factions/Factions.java @@ -268,56 +268,52 @@ public class Factions extends JavaPlugin { // -------------------------------------------- // public static boolean hasPermParticipate(CommandSender sender) { - return hasPerm(sender, "factions.participate", false); + return hasPerm(sender, "factions.participate"); } public static boolean hasPermCreate(CommandSender sender) { - return hasPerm(sender, "factions.create", false); + return hasPerm(sender, "factions.create"); } public static boolean hasPermManageSafeZone(CommandSender sender) { - return hasPerm(sender, "factions.manageSafeZone", true); + return hasPerm(sender, "factions.manageSafeZone"); } public static boolean hasPermManageWarZone(CommandSender sender) { - return hasPerm(sender, "factions.manageWarZone", true); + return hasPerm(sender, "factions.manageWarZone"); } public static boolean hasPermAdminBypass(CommandSender sender) { - return hasPerm(sender, "factions.adminBypass", true); + return hasPerm(sender, "factions.adminBypass"); } public static boolean hasPermReload(CommandSender sender) { - return hasPerm(sender, "factions.reload", true); + return hasPerm(sender, "factions.reload"); } public static boolean hasPermSaveAll(CommandSender sender) { - return hasPerm(sender, "factions.saveall", true); + return hasPerm(sender, "factions.saveall"); } public static boolean hasPermLock(CommandSender sender) { - return hasPerm(sender, "factions.lock", true); + return hasPerm(sender, "factions.lock"); } public static boolean hasPermDisband(CommandSender sender) { - return hasPerm(sender, "factions.disband", true); + return hasPerm(sender, "factions.disband"); } public static boolean hasPermWorlds(CommandSender sender) { - return hasPerm(sender, "factions.worldOptions", true); + return hasPerm(sender, "factions.worldOptions"); } - private static boolean hasPerm(CommandSender sender, String permNode, boolean fallbackOnlyOp) { + private static boolean hasPerm(CommandSender sender, String permNode) { if (Factions.Permissions == null || ! (sender instanceof Player)) { - return fallbackOnlyOp == false || sender.isOp(); + return sender.isOp() || sender.hasPermission(permNode); } - if (sender instanceof Player) { - Player player = (Player)sender; - return Factions.Permissions.has(player, permNode); - } - - return false; + Player player = (Player)sender; + return Factions.Permissions.has(player, permNode); } // -------------------------------------------- // diff --git a/src/plugin.yml b/src/plugin.yml index 2e5ec8e4..67eb264d 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -7,7 +7,52 @@ softdepend: - EssentialsChat - HeroChat - iChat + - LocalAreaChat commands: f: description: All of the Factions commands - usage: See documentation. \ No newline at end of file + usage: See documentation. +permissions: + factions.*: + description: Grants all Factions permissions + children: + factions.participate: true + factions.create: true + factions.manageSafeZone: true + factions.manageWarZone: true + factions.adminBypass: true + factions.reload: true + factions.saveall: true + factions.lock: true + factions.disband: true + factions.worldOptions: true + factions.participate: + description: Allows the player to participate in a faction + default: true + factions.create: + description: Allows the player to create a new faction + default: true + factions.manageSafeZone: + description: Allows the player to claim land as a safe zone, and to build/destroy within safe zones + default: op + factions.manageWarZone: + description: Allows the player to claim land as a war zone, and to build/destroy within war zones + default: op + factions.adminBypass: + description: Allows the player to bypass many normal restrictions, and use the bypass command + default: op + factions.reload: + description: Can use the /f reload command to reload data file(s) from disk + default: op + factions.saveall: + description: Can use the /f saveall command to save all data to disk + default: op + factions.lock: + description: Can use the /f lock [on/off] command to temporarily lock the data files from being overwritten + default: op + factions.disband: + description: Can use the /f disband command to disband any faction + default: op + factions.worldOptions: + description: Can use the /f worldnoclaim and /f worldnopowerloss commands + default: op