mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-15 15:28:36 +01:00
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());
|
||||
}
|
||||
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.
|
||||
return disguise;
|
||||
|
Loading…
Reference in New Issue
Block a user