mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-10 00:28:22 +02:00
Missing gm changes
This commit is contained in:
@@ -147,3 +147,40 @@ v 1.9:
|
|||||||
- Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups.
|
- Prevent adding inheritances and info nodes to globalgroups. These are permissions collections, not player groups.
|
||||||
- Prevent promoting players to, and demoting to GlobalGroups.
|
- Prevent promoting players to, and demoting to GlobalGroups.
|
||||||
- Make 'manload' reload the config correctly.
|
- 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.
|
@@ -23,11 +23,13 @@ public class GMConfiguration {
|
|||||||
private YamlConfiguration GMconfig;
|
private YamlConfiguration GMconfig;
|
||||||
|
|
||||||
public GMConfiguration(GroupManager plugin) {
|
public GMConfiguration(GroupManager plugin) {
|
||||||
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
|
|
||||||
if (!plugin.getDataFolder().exists()) {
|
if (!plugin.getDataFolder().exists()) {
|
||||||
plugin.getDataFolder().mkdirs();
|
plugin.getDataFolder().mkdirs();
|
||||||
}
|
}
|
||||||
@@ -55,17 +57,21 @@ public class GMConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOpOverride() {
|
public boolean isOpOverride() {
|
||||||
|
|
||||||
return GMconfig.getBoolean("settings.config.opOverrides", true);
|
return GMconfig.getBoolean("settings.config.opOverrides", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isToggleValidate() {
|
public boolean isToggleValidate() {
|
||||||
|
|
||||||
return GMconfig.getBoolean("settings.config.validate_toggle", true);
|
return GMconfig.getBoolean("settings.config.validate_toggle", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> getMirrorsMap() {
|
public Map<String, Object> getMirrorsMap() {
|
||||||
|
|
||||||
// Try to fetch the old mirror path first
|
// Try to fetch the old mirror path first
|
||||||
if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) {
|
if (GMconfig.isConfigurationSection("settings.permission.world.mirror")) {
|
||||||
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
|
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.permission.world.mirror").getValues(false);
|
||||||
} else if (GMconfig.isConfigurationSection("settings.mirrors")){
|
} else if (GMconfig.isConfigurationSection("settings.mirrors")) {
|
||||||
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.mirrors").getValues(false);
|
return (Map<String, Object>) GMconfig.getConfigurationSection("settings.mirrors").getValues(false);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -73,10 +79,12 @@ public class GMConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Integer getSaveInterval() {
|
public Integer getSaveInterval() {
|
||||||
|
|
||||||
return GMconfig.getInt("settings.data.save.minutes", 10);
|
return GMconfig.getInt("settings.data.save.minutes", 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getBackupDuration() {
|
public Integer getBackupDuration() {
|
||||||
|
|
||||||
return GMconfig.getInt("settings.data.save.hours", 24);
|
return GMconfig.getInt("settings.data.save.hours", 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
*/
|
*/
|
||||||
private ArrayList<String> inherits = new ArrayList<String>();
|
private ArrayList<String> inherits = new ArrayList<String>();
|
||||||
/**
|
/**
|
||||||
*This one holds the fields in INFO node.
|
* This one holds the fields in INFO node.
|
||||||
* like prefix = 'c'
|
* like prefix = 'c'
|
||||||
* or build = false
|
* or build = false
|
||||||
*/
|
*/
|
||||||
@@ -37,6 +37,7 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
* @param name
|
* @param name
|
||||||
*/
|
*/
|
||||||
public Group(WorldDataHolder source, String name) {
|
public Group(WorldDataHolder source, String name) {
|
||||||
|
|
||||||
super(source, name);
|
super(source, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,24 +47,28 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
* @param name
|
* @param name
|
||||||
*/
|
*/
|
||||||
public Group(String name) {
|
public Group(String name) {
|
||||||
|
|
||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is this a GlobalGroup
|
* Is this a GlobalGroup
|
||||||
*
|
*
|
||||||
* @return
|
* @return true if this is a global group
|
||||||
*/
|
*/
|
||||||
public boolean isGlobal() {
|
public boolean isGlobal() {
|
||||||
|
|
||||||
return (getDataSource() == null);
|
return (getDataSource() == null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clone this group
|
* Clone this group
|
||||||
|
*
|
||||||
* @return a clone of this group
|
* @return a clone of this group
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Group clone() {
|
public Group clone() {
|
||||||
|
|
||||||
Group clone;
|
Group clone;
|
||||||
|
|
||||||
if (isGlobal()) {
|
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
|
* Use this to deliver a group from a different dataSource to another
|
||||||
|
*
|
||||||
* @param dataSource
|
* @param dataSource
|
||||||
* @return Null or Clone
|
* @return Null or Clone
|
||||||
*/
|
*/
|
||||||
public Group clone(WorldDataHolder dataSource) {
|
public Group clone(WorldDataHolder dataSource) {
|
||||||
|
|
||||||
if (dataSource.groupExists(this.getName())) {
|
if (dataSource.groupExists(this.getName())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -109,9 +116,11 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
* an unmodifiable list of inherits list
|
* an unmodifiable list of inherits list
|
||||||
* You can't manage the list by here
|
* You can't manage the list by here
|
||||||
* Lol... version 0.6 had a problem because this.
|
* Lol... version 0.6 had a problem because this.
|
||||||
|
*
|
||||||
* @return the inherits
|
* @return the inherits
|
||||||
*/
|
*/
|
||||||
public List<String> getInherits() {
|
public List<String> getInherits() {
|
||||||
|
|
||||||
return Collections.unmodifiableList(inherits);
|
return Collections.unmodifiableList(inherits);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,6 +128,7 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
* @param inherit the inherits to set
|
* @param inherit the inherits to set
|
||||||
*/
|
*/
|
||||||
public void addInherits(Group inherit) {
|
public void addInherits(Group inherit) {
|
||||||
|
|
||||||
if (!isGlobal()) {
|
if (!isGlobal()) {
|
||||||
if (!this.getDataSource().groupExists(inherit.getName())) {
|
if (!this.getDataSource().groupExists(inherit.getName())) {
|
||||||
getDataSource().addGroup(inherit);
|
getDataSource().addGroup(inherit);
|
||||||
@@ -135,6 +145,7 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean removeInherits(String inherit) {
|
public boolean removeInherits(String inherit) {
|
||||||
|
|
||||||
if (!isGlobal()) {
|
if (!isGlobal()) {
|
||||||
if (this.inherits.contains(inherit.toLowerCase())) {
|
if (this.inherits.contains(inherit.toLowerCase())) {
|
||||||
this.inherits.remove(inherit.toLowerCase());
|
this.inherits.remove(inherit.toLowerCase());
|
||||||
@@ -150,6 +161,7 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
* @return the variables
|
* @return the variables
|
||||||
*/
|
*/
|
||||||
public GroupVariables getVariables() {
|
public GroupVariables getVariables() {
|
||||||
|
|
||||||
return variables;
|
return variables;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,6 +170,7 @@ public class Group extends DataUnit implements Cloneable {
|
|||||||
* @param varList
|
* @param varList
|
||||||
*/
|
*/
|
||||||
public void setVariables(Map<String, Object> varList) {
|
public void setVariables(Map<String, Object> varList) {
|
||||||
|
|
||||||
if (!isGlobal()) {
|
if (!isGlobal()) {
|
||||||
GroupVariables temp = new GroupVariables(this, varList);
|
GroupVariables temp = new GroupVariables(this, varList);
|
||||||
variables.clearVars();
|
variables.clearVars();
|
||||||
|
Reference in New Issue
Block a user