mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-14 04:38:11 +00:00
Fix error being thrown when using non-flagwatcher option
This commit is contained in:
parent
785c864d81
commit
197c500832
1 changed files with 4 additions and 1 deletions
|
@ -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 a new issue