mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Improve Javadocs, clean ' strip checks, update changelog.
This commit is contained in:
parent
862e71bc85
commit
67be18566c
3 changed files with 16 additions and 42 deletions
|
@ -212,7 +212,7 @@ v 2.0:
|
||||||
- Add support for BukkitForge using 'overworld' as the main world name.
|
- Add support for BukkitForge using 'overworld' as the main world name.
|
||||||
- Prevent '*' permissions granting the 'groupmanager.noofflineperms' permission.
|
- Prevent '*' permissions granting the 'groupmanager.noofflineperms' permission.
|
||||||
- Added '/mancheckw <world>' to inspect which permission files a world is referencing.
|
- Added '/mancheckw <world>' to inspect which permission files a world is referencing.
|
||||||
- Add config potion to set if GM commands should be allowed on CommnandBlocks.
|
- Add config potion to set if GM commands should be allowed on CommnandBlocks.
|
||||||
- Catch the error when using an out of date config for 'allow_commandblocks' So it doesn't kill the whole config.
|
- Catch the error when using an out of date config for 'allow_commandblocks' So it doesn't kill the whole config.
|
||||||
- '/manselect' will no longer list duplicate worlds.
|
- '/manselect' will no longer list duplicate worlds.
|
||||||
- Added a new mirroring option in the config of 'all_unnamed_worlds'. This will cause all new or unnamed worlds to use this mirroring.
|
- Added a new mirroring option in the config of 'all_unnamed_worlds'. This will cause all new or unnamed worlds to use this mirroring.
|
||||||
|
@ -220,4 +220,5 @@ v 2.0:
|
||||||
- Warn when adding a node where an exception already exist.
|
- Warn when adding a node where an exception already exist.
|
||||||
- Only prevent adding nodes with '/manuaddp' and '/mangaddp' if they are exact matches (not wildcards).
|
- Only prevent adding nodes with '/manuaddp' and '/mangaddp' if they are exact matches (not wildcards).
|
||||||
- Store worldSelection indexed on the senders name rather than the object (fixes commandblocks using manselect).
|
- Store worldSelection indexed on the senders name rather than the object (fixes commandblocks using manselect).
|
||||||
- Check subgroup permissions with an equal priority so no one subgroup is higher ranked than another.
|
- Check subgroup permissions with an equal priority so no one subgroup is higher ranked than another.
|
||||||
|
- add recursive permission adding/deleting
|
||||||
|
|
|
@ -738,11 +738,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
|
|
||||||
for (int i = 1; i < args.length; i++)
|
for (int i = 1; i < args.length; i++)
|
||||||
{
|
{
|
||||||
auxString = args[i];
|
auxString = args[i].replace("'", "");
|
||||||
if (auxString.startsWith("'") && auxString.endsWith("'"))
|
|
||||||
{
|
|
||||||
auxString = auxString.substring(1, auxString.length() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
||||||
if (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
|
if (!isConsole && !isOpOverride && (permissionResult.resultType.equals(PermissionCheckResult.Type.NOTFOUND) || permissionResult.resultType.equals(PermissionCheckResult.Type.NEGATION))) {
|
||||||
|
@ -791,11 +787,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
|
|
||||||
for (int i = 1; i < args.length; i++)
|
for (int i = 1; i < args.length; i++)
|
||||||
{
|
{
|
||||||
auxString = args[i];
|
auxString = args[i].replace("'", "");
|
||||||
if (auxString.startsWith("'") && auxString.endsWith("'"))
|
|
||||||
{
|
|
||||||
auxString = auxString.substring(1, auxString.length() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
if (!isConsole && !isOpOverride && (senderGroup != null ? permissionHandler.inGroup(auxUser.getName(), senderGroup.getName()) : false)) {
|
||||||
sender.sendMessage(ChatColor.RED + "You can't modify a player with same group as you, or higher.");
|
sender.sendMessage(ChatColor.RED + "You can't modify a player with same group as you, or higher.");
|
||||||
|
@ -950,11 +942,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
auxString = args[1];
|
auxString = args[1].replace("'", "");
|
||||||
if (auxString.startsWith("'") && auxString.endsWith("'"))
|
|
||||||
{
|
|
||||||
auxString = auxString.substring(1, auxString.length() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
|
if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1019,11 +1007,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
|
|
||||||
for (int i = 1; i < args.length; i++)
|
for (int i = 1; i < args.length; i++)
|
||||||
{
|
{
|
||||||
auxString = args[i];
|
auxString = args[i].replace("'", "");
|
||||||
if (auxString.startsWith("'") && auxString.endsWith("'"))
|
|
||||||
{
|
|
||||||
auxString = auxString.substring(1, auxString.length() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validating your permissions
|
// Validating your permissions
|
||||||
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
||||||
|
@ -1065,11 +1049,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
}
|
}
|
||||||
for (int i = 1; i < args.length; i++)
|
for (int i = 1; i < args.length; i++)
|
||||||
{
|
{
|
||||||
auxString = args[i];
|
auxString = args[i].replace("'", "");
|
||||||
if (auxString.startsWith("'") && auxString.endsWith("'"))
|
|
||||||
{
|
|
||||||
auxString = auxString.substring(1, auxString.length() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validating your permissions
|
// Validating your permissions
|
||||||
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
permissionResult = permissionHandler.checkFullUserPermission(senderUser, auxString);
|
||||||
|
@ -1333,10 +1313,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
auxString += " ";
|
auxString += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (auxString.startsWith("'") && auxString.endsWith("'"))
|
auxString = auxString.replace("'", "");
|
||||||
{
|
|
||||||
auxString = auxString.substring(1, auxString.length() - 1);
|
|
||||||
}
|
|
||||||
auxUser.getVariables().addVar(args[1], Variables.parseVariableValue(auxString));
|
auxUser.getVariables().addVar(args[1], Variables.parseVariableValue(auxString));
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Variable " + ChatColor.GOLD + args[1] + ChatColor.YELLOW + ":'" + ChatColor.GREEN + auxString + ChatColor.YELLOW + "' added to the user " + auxUser.getName());
|
sender.sendMessage(ChatColor.YELLOW + "Variable " + ChatColor.GOLD + args[1] + ChatColor.YELLOW + ":'" + ChatColor.GREEN + auxString + ChatColor.YELLOW + "' added to the user " + auxUser.getName());
|
||||||
|
|
||||||
|
@ -1485,10 +1462,8 @@ public class GroupManager extends JavaPlugin {
|
||||||
auxString += " ";
|
auxString += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (auxString.startsWith("'") && auxString.endsWith("'"))
|
|
||||||
{
|
auxString = auxString.replace("'", "");
|
||||||
auxString = auxString.substring(1, auxString.length() - 1);
|
|
||||||
}
|
|
||||||
auxGroup.getVariables().addVar(args[1], Variables.parseVariableValue(auxString));
|
auxGroup.getVariables().addVar(args[1], Variables.parseVariableValue(auxString));
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Variable " + ChatColor.GOLD + args[1] + ChatColor.YELLOW + ":'" + ChatColor.GREEN + auxString + ChatColor.YELLOW + "' added to the group " + auxGroup.getName());
|
sender.sendMessage(ChatColor.YELLOW + "Variable " + ChatColor.GOLD + args[1] + ChatColor.YELLOW + ":'" + ChatColor.GREEN + auxString + ChatColor.YELLOW + "' added to the group " + auxGroup.getName());
|
||||||
|
|
||||||
|
@ -2097,7 +2072,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a permission exists and of a lower priority.
|
* Checks if a permission exists and of a lower or same priority.
|
||||||
*/
|
*/
|
||||||
private boolean checkPermissionExists(CommandSender sender, String newPerm, PermissionCheckResult oldPerm, String type) {
|
private boolean checkPermissionExists(CommandSender sender, String newPerm, PermissionCheckResult oldPerm, String type) {
|
||||||
|
|
||||||
|
@ -2132,13 +2107,11 @@ public class GroupManager extends JavaPlugin {
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.RED + "The " + type + " already has an exception for this node.");
|
sender.sendMessage(ChatColor.RED + "The " + type + " already has an exception for this node.");
|
||||||
sender.sendMessage(ChatColor.RED + "Node: " + oldPerm.accessLevel);
|
sender.sendMessage(ChatColor.RED + "Node: " + oldPerm.accessLevel);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else if (oldPerm.resultType.equals(PermissionCheckResult.Type.NEGATION))
|
else if (oldPerm.resultType.equals(PermissionCheckResult.Type.NEGATION))
|
||||||
{
|
{
|
||||||
sender.sendMessage(ChatColor.RED + "The " + type + " already has a matching negated node.");
|
sender.sendMessage(ChatColor.RED + "The " + type + " already has a matching negated node.");
|
||||||
sender.sendMessage(ChatColor.RED + "Node: " + oldPerm.accessLevel);
|
sender.sendMessage(ChatColor.RED + "Node: " + oldPerm.accessLevel);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else if (oldPerm.resultType.equals(PermissionCheckResult.Type.FOUND))
|
else if (oldPerm.resultType.equals(PermissionCheckResult.Type.FOUND))
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,11 +34,11 @@ commands:
|
||||||
permissions: groupmanager.mangdel
|
permissions: groupmanager.mangdel
|
||||||
manuaddp:
|
manuaddp:
|
||||||
description: Add permissions directly to the player.
|
description: Add permissions directly to the player.
|
||||||
usage: /<command> <player> <permissions>
|
usage: /<command> <player> <permission> [permission2] [permission3]..
|
||||||
permissions: groupmanager.manuaddp
|
permissions: groupmanager.manuaddp
|
||||||
manudelp:
|
manudelp:
|
||||||
description: Removes permissions directly from the player.
|
description: Removes permissions directly from the player.
|
||||||
usage: /<command> <player> <permissions>
|
usage: /<command> <player> <permission> [permission2] [permission3]..
|
||||||
permissions: groupmanager.manudelp
|
permissions: groupmanager.manudelp
|
||||||
manuclearp:
|
manuclearp:
|
||||||
description: Removes all permissions of a player.
|
description: Removes all permissions of a player.
|
||||||
|
@ -54,11 +54,11 @@ commands:
|
||||||
permissions: groupmanager.manucheckp
|
permissions: groupmanager.manucheckp
|
||||||
mangaddp:
|
mangaddp:
|
||||||
description: Add permissions to a group.
|
description: Add permissions to a group.
|
||||||
usage: /<command> <group> <permissions>
|
usage: /<command> <group> <permission> [permission2] [permission3]..
|
||||||
permissions: groupmanager.mangaddp
|
permissions: groupmanager.mangaddp
|
||||||
mangdelp:
|
mangdelp:
|
||||||
description: Removes permissions from a group.
|
description: Removes permissions from a group.
|
||||||
usage: /<command> <group> <permissions>
|
usage: /<command> <group> <permission> [permission2] [permission3]..
|
||||||
permissions: groupmanager.mangdelp
|
permissions: groupmanager.mangdelp
|
||||||
mangclearp:
|
mangclearp:
|
||||||
description: Removes all permissions of a group.
|
description: Removes all permissions of a group.
|
||||||
|
|
Loading…
Reference in a new issue