diff options
author | ElgarL <ElgarL@palmergames.com> | 2011-10-31 20:41:50 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2011-10-31 20:41:50 +0000 |
commit | 97cae6c0cbec86d18b53e6e5acfbf149e2b80179 (patch) | |
tree | 293cfd32731285b7a049ccda9bc412950b0cf0a4 /EssentialsGroupManager/src | |
parent | 1fd02b8a4ad82427f96e1870252a31375d58c2f5 (diff) | |
download | Essentials-97cae6c0cbec86d18b53e6e5acfbf149e2b80179.tar Essentials-97cae6c0cbec86d18b53e6e5acfbf149e2b80179.tar.gz Essentials-97cae6c0cbec86d18b53e6e5acfbf149e2b80179.tar.lz Essentials-97cae6c0cbec86d18b53e6e5acfbf149e2b80179.tar.xz Essentials-97cae6c0cbec86d18b53e6e5acfbf149e2b80179.zip |
Added a config.yml setting of 'validate_toggle' for those who prefer
'mantogglevalidate' to always be off.
Diffstat (limited to 'EssentialsGroupManager/src')
4 files changed, 26 insertions, 1 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index aef900781..cc9192da9 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -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.
\ No newline at end of file + - Expanded 'canUserBuild()' to include inheritance and subgroups.
+ - Added a config.yml setting of 'validate_toggle' for those who prefer 'mantogglevalidate' to always be off.
\ No newline at end of file diff --git a/EssentialsGroupManager/src/config.yml b/EssentialsGroupManager/src/config.yml index 6bea3e3e0..d9f469477 100644 --- a/EssentialsGroupManager/src/config.yml +++ b/EssentialsGroupManager/src/config.yml @@ -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 diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java index 521b8c1fb..591afe3fa 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java @@ -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 diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index e3999d212..bbe5cae09 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -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; |