mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 03:30:02 +00:00
Allow disguise options on all parameters
This commit is contained in:
parent
cae0fca8cb
commit
30b9b0cc1f
1 changed files with 2 additions and 9 deletions
|
@ -722,7 +722,7 @@ public class DisguiseParser {
|
|||
DisguiseParseException {
|
||||
Method[] methods = ParamInfoManager.getDisguiseWatcherMethods(disguise.getWatcher().getClass());
|
||||
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++) {
|
||||
// This is the method name they provided
|
||||
|
@ -787,14 +787,7 @@ public class DisguiseParser {
|
|||
usedOptions.add(methodToUse.getName().toLowerCase());
|
||||
}
|
||||
|
||||
if (methodToUse.getName().equalsIgnoreCase("setpainting") ||
|
||||
methodToUse.getName().equalsIgnoreCase("setpotionid") ||
|
||||
methodToUse.getName().equalsIgnoreCase("setitemstack") ||
|
||||
methodToUse.getName().equalsIgnoreCase("setblock")) {
|
||||
if (disguiseOptions == null) {
|
||||
disguiseOptions = getDisguiseOptions(sender, permNode, disguisePerm);
|
||||
}
|
||||
|
||||
if (!disguiseOptions.isEmpty()) {
|
||||
String stringValue = ParamInfoManager.toString(valueToSet);
|
||||
|
||||
if (!hasPermissionOption(disguiseOptions, stringValue)) {
|
||||
|
|
Loading…
Reference in a new issue