mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-24 07:13:17 +02:00
change ' strip checks
This commit is contained in:
@@ -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());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user