New command /f config [setting] [value] which can be used to change any conf.json setting. This is mainly for people who have trouble editing the file manually, for whatever reason. It even fixes any capitalization errors, and saves the conf.json file immediately after an option is changed. Can be run by player or from server console. Uses new permission node "factions.config".

This commit is contained in:
Brettflan
2011-07-22 07:25:12 -05:00
parent 5dc6dcd9ed
commit c818ddff99
5 changed files with 239 additions and 8 deletions

View File

@ -77,6 +77,7 @@ public class Factions extends JavaPlugin {
commands.add(new FCommandBypass());
commands.add(new FCommandChat());
commands.add(new FCommandClaim());
commands.add(new FCommandConfig());
commands.add(new FCommandCreate());
commands.add(new FCommandDeinvite());
commands.add(new FCommandDescription());
@ -337,6 +338,10 @@ public class Factions extends JavaPlugin {
return hasPerm(sender, "factions.lock");
}
public static boolean hasPermConfigure(CommandSender sender) {
return hasPerm(sender, "factions.config");
}
public static boolean hasPermDisband(CommandSender sender) {
return hasPerm(sender, "factions.disband");
}