Added a config.yml setting of 'validate_toggle' for those who prefer

'mantogglevalidate' to always be off.
This commit is contained in:
ElgarL 2011-10-31 20:41:50 +00:00
parent 1fd02b8a4a
commit 97cae6c0cb
4 changed files with 26 additions and 1 deletions

View file

@ -62,4 +62,5 @@ v 1.5:
- Added Info node support to Global Groups.
- Fixed an error on 'manucheckv'. If the users doesn't have the variable it fell through causing an exception.
- Added checking of subgroups for Info nodes.
- Expanded 'canUserBuild()' to include inheritance and subgroups.
- Expanded 'canUserBuild()' to include inheritance and subgroups.
- Added a config.yml setting of 'validate_toggle' for those who prefer 'mantogglevalidate' to always be off.

View file

@ -8,6 +8,10 @@ settings:
# If the player is op any permissions set to Op will follow suit.
bukkit_perms_override: false
# Default setting for 'mantoglevalidate'
# true will cause GroupManager to attempt name matching by default.
validate_toggle: true
data:
save:
# How often GroupManager will save it's data back to groups and users.yml

View file

@ -48,7 +48,10 @@ public class GMConfiguration {
} catch (Exception ex) {
throw new IllegalArgumentException("The following file couldn't pass on Parser.\n" + configFile.getPath(), ex);
}
// Setup defaults
adjustLoggerLevel();
plugin.setValidateOnlinePlayer(isToggleValidate());
}
public boolean isOpOverride() {
@ -57,6 +60,9 @@ public class GMConfiguration {
public boolean isBukkitPermsOverride() {
return GMconfig.getBoolean("settings.config.bukkit_perms_override", false);
}
public boolean isToggleValidate() {
return GMconfig.getBoolean("settings.config.validate_toggle", true);
}
public Map<String, Object> getMirrorsMap() {
// Try to fetch the old mirror path first

View file

@ -55,6 +55,20 @@ public class GroupManager extends JavaPlugin {
private Map<CommandSender, String> selectedWorlds = new HashMap<CommandSender, String>();
private WorldsHolder worldsHolder;
private boolean validateOnlinePlayer = true;
/**
* @return the validateOnlinePlayer
*/
public boolean isValidateOnlinePlayer() {
return validateOnlinePlayer;
}
/**
* @param validateOnlinePlayer the validateOnlinePlayer to set
*/
public void setValidateOnlinePlayer(boolean validateOnlinePlayer) {
this.validateOnlinePlayer = validateOnlinePlayer;
}
private boolean isReady = false;
private static boolean isLoaded = false;
protected GMConfiguration config;