1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-08 07:36:42 +02:00

Missing gm changes

This commit is contained in:
ementalo
2012-06-06 10:01:27 +01:00
parent 9f3b3d5873
commit 72b4ac257d
4 changed files with 781 additions and 573 deletions

View File

@@ -147,3 +147,40 @@ v 1.9:
- Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups.
- Prevent promoting players to, and demoting to GlobalGroups.
- Make 'manload' reload the config correctly.
- Minor optimization when checking bukkit permissions.
- Better reporting when a users.yml is failing to load.
- Expanded '/manuadd'to accept an optional variable for the world (eg '/manuadd <player> <group> <world>').
- Removed some debug spam.
- Don't remove an attachment on a player leaving as Bukkit never forgets it. This fixes non mirrored permissions being messed up if a player relogs.
- Treat all world names as lower case for file handling (please check in your worlds folder. You should have no folders with upper case letters from now).
- Auto rename all case sensitive world folders to lower case (if possible).
- Update GlobalGroups.yml for new/changed Towny permission nodes.
- Stop attempting to push empty permissions when players edit the yml's incorrectly.
- Catch errors caused by bad indentation in yml's.
- Force remove player attachments on disconnect, and tidyup during player join in case of any errors. Fixes a bug of losing permissions.
- Added a new permission node 'groupmanager.op'. This will cause players with this node to be treated as op's when
using GroupManager commands (they will still require each commands permission node to use them).
- Prevent Null entries in group inheritance from throwing errors.
v 2.0:
- Fix GM reporting of permission inheritance to retain the correct order. Lower inheritance groups can no longer negate a higher groups permissions.
- Fix an error I caused trying to modify an unmodifiable list when parsing '*' permissions.
- Don't throw errors when attempting to remove permission attachments (bukkit will have already removed it).
- Remove all permission attachments when performing a manload or restart.
- Expand 'manwhois' to also list a users subgroups.
- Fix a concurrent modification error when removing all attachments.
- Better handling of errors in user and group yml's.
- Added missing confirmation message on '/manload'.
- Stop the error on shutdown if GM failed to load at startup.
- GroupManager will now generate it's own log (in the GM folder) to keep things tidy, but also to account of those players unable to find/access their server.log.
- Startup errors will now lock out ALL commands other than '/manload'
- Fix 'manuadd' to use the default or selected world (via 'manselect'), if the world is not specified in the command.
- Expand GlobalGroups.yml and groups.yml to cover the VanishNoPacket plugin. Demonstrating how to negate and add nodes when using the '*' permission with inheritance.
- Fix silly nested throw/catch statements. Errors are now correctly generated when reading yml's.
- Unregister the worldsHolder as a service on a reload/shutdown instead of the whole plugin.
- Update all code formatting to use tabs for indentation.
- Stop using our own deprecated methods as we tell others to do.
- Finally remove all deprecated methods.
- Re-initialize the WorldsHolder on a reload, as un-registering and re-registering a new holder means all plugins have to check for the new service on every quiery.
- Prevent null perms getting past the GlobalGroups loader.
- Fix forgetting sub groups on a manload.
- Allow 'manucheckp' to notify when superperms reports false but it is really negated.

View File

@@ -23,11 +23,13 @@ public class GMConfiguration {
private YamlConfiguration GMconfig;
public GMConfiguration(GroupManager plugin) {
this.plugin = plugin;
load();
}
public void load() {
if (!plugin.getDataFolder().exists()) {
plugin.getDataFolder().mkdirs();
}
@@ -55,13 +57,17 @@ public class GMConfiguration {
}
public boolean isOpOverride() {
return GMconfig.getBoolean("settings.config.opOverrides", true);
}
public boolean isToggleValidate() {
return GMconfig.getBoolean("settings.config.validate_toggle", true);
}
public Map<String, Object> getMirrorsMap() {
// Try to fetch the old mirror path first
if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) {
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
@@ -73,10 +79,12 @@ public class GMConfiguration {
}
public Integer getSaveInterval() {
return GMconfig.getInt("settings.data.save.minutes", 10);
}
public Integer getBackupDuration() {
return GMconfig.getInt("settings.data.save.hours", 24);
}

View File

@@ -37,6 +37,7 @@ public class Group extends DataUnit implements Cloneable {
* @param name
*/
public Group(WorldDataHolder source, String name) {
super(source, name);
}
@@ -46,24 +47,28 @@ public class Group extends DataUnit implements Cloneable {
* @param name
*/
public Group(String name) {
super(name);
}
/**
* Is this a GlobalGroup
*
* @return
* @return true if this is a global group
*/
public boolean isGlobal() {
return (getDataSource() == null);
}
/**
* Clone this group
*
* @return a clone of this group
*/
@Override
public Group clone() {
Group clone;
if (isGlobal()) {
@@ -83,10 +88,12 @@ public class Group extends DataUnit implements Cloneable {
/**
* Use this to deliver a group from a different dataSource to another
*
* @param dataSource
* @return Null or Clone
*/
public Group clone(WorldDataHolder dataSource) {
if (dataSource.groupExists(this.getName())) {
return null;
}
@@ -109,9 +116,11 @@ public class Group extends DataUnit implements Cloneable {
* an unmodifiable list of inherits list
* You can't manage the list by here
* Lol... version 0.6 had a problem because this.
*
* @return the inherits
*/
public List<String> getInherits() {
return Collections.unmodifiableList(inherits);
}
@@ -119,6 +128,7 @@ public class Group extends DataUnit implements Cloneable {
* @param inherit the inherits to set
*/
public void addInherits(Group inherit) {
if (!isGlobal()) {
if (!this.getDataSource().groupExists(inherit.getName())) {
getDataSource().addGroup(inherit);
@@ -135,6 +145,7 @@ public class Group extends DataUnit implements Cloneable {
}
public boolean removeInherits(String inherit) {
if (!isGlobal()) {
if (this.inherits.contains(inherit.toLowerCase())) {
this.inherits.remove(inherit.toLowerCase());
@@ -150,6 +161,7 @@ public class Group extends DataUnit implements Cloneable {
* @return the variables
*/
public GroupVariables getVariables() {
return variables;
}
@@ -158,6 +170,7 @@ public class Group extends DataUnit implements Cloneable {
* @param varList
*/
public void setVariables(Map<String, Object> varList) {
if (!isGlobal()) {
GroupVariables temp = new GroupVariables(this, varList);
variables.clearVars();