Fix error being thrown when using non-flagwatcher option
This commit is contained in:
parent
785c864d81
commit
197c500832
@ -581,7 +581,10 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
|
|||||||
usedOptions.add(methodName.toLowerCase());
|
usedOptions.add(methodName.toLowerCase());
|
||||||
}
|
}
|
||||||
doCheck(optionPermissions, usedOptions);
|
doCheck(optionPermissions, usedOptions);
|
||||||
methodToUse.invoke(disguise.getWatcher(), value);
|
if (methodToUse.getDeclaringClass().isAssignableFrom(FlagWatcher.class))
|
||||||
|
methodToUse.invoke(disguise.getWatcher(), value);
|
||||||
|
else
|
||||||
|
methodToUse.invoke(disguise, value);
|
||||||
}
|
}
|
||||||
// Alright. We've constructed our disguise.
|
// Alright. We've constructed our disguise.
|
||||||
return disguise;
|
return disguise;
|
||||||
|
Loading…
Reference in New Issue
Block a user