Allow disguise options on all parameters
This commit is contained in:
parent
7109633a67
commit
7ee65d26b2
@ -722,7 +722,7 @@ public class DisguiseParser {
|
|||||||
DisguiseParseException {
|
DisguiseParseException {
|
||||||
Method[] methods = ParamInfoManager.getDisguiseWatcherMethods(disguise.getWatcher().getClass());
|
Method[] methods = ParamInfoManager.getDisguiseWatcherMethods(disguise.getWatcher().getClass());
|
||||||
List<String> list = new ArrayList<>(Arrays.asList(args));
|
List<String> list = new ArrayList<>(Arrays.asList(args));
|
||||||
HashMap<String, Boolean> disguiseOptions = null;
|
HashMap<String, Boolean> disguiseOptions = getDisguiseOptions(sender, permNode, disguisePerm);
|
||||||
|
|
||||||
for (int argIndex = 0; argIndex < args.length; argIndex++) {
|
for (int argIndex = 0; argIndex < args.length; argIndex++) {
|
||||||
// This is the method name they provided
|
// This is the method name they provided
|
||||||
@ -787,14 +787,7 @@ public class DisguiseParser {
|
|||||||
usedOptions.add(methodToUse.getName().toLowerCase());
|
usedOptions.add(methodToUse.getName().toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (methodToUse.getName().equalsIgnoreCase("setpainting") ||
|
if (!disguiseOptions.isEmpty()) {
|
||||||
methodToUse.getName().equalsIgnoreCase("setpotionid") ||
|
|
||||||
methodToUse.getName().equalsIgnoreCase("setitemstack") ||
|
|
||||||
methodToUse.getName().equalsIgnoreCase("setblock")) {
|
|
||||||
if (disguiseOptions == null) {
|
|
||||||
disguiseOptions = getDisguiseOptions(sender, permNode, disguisePerm);
|
|
||||||
}
|
|
||||||
|
|
||||||
String stringValue = ParamInfoManager.toString(valueToSet);
|
String stringValue = ParamInfoManager.toString(valueToSet);
|
||||||
|
|
||||||
if (!hasPermissionOption(disguiseOptions, stringValue)) {
|
if (!hasPermissionOption(disguiseOptions, stringValue)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user