Fix error being thrown when using non-flagwatcher option
This commit is contained in:
		| @@ -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; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user