Fix a method casting problem

This commit is contained in:
libraryaddict 2014-09-14 18:04:05 +12:00
parent 385db0dd55
commit c61cd4b6e0

View File

@ -581,7 +581,7 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
usedOptions.add(methodName.toLowerCase());
}
doCheck(optionPermissions, usedOptions);
if (methodToUse.getDeclaringClass().isAssignableFrom(FlagWatcher.class))
if (FlagWatcher.class.isAssignableFrom(methodToUse.getDeclaringClass()))
methodToUse.invoke(disguise.getWatcher(), value);
else
methodToUse.invoke(disguise, value);