Dedent parseDisguise() method for-loop
This commit is contained in:
		| @@ -279,8 +279,14 @@ public abstract class BaseDisguiseCommand implements CommandExecutor { | ||||
|                 if (!method.getName().startsWith("get") && method.getName().equalsIgnoreCase(methodName) | ||||
|                         && method.getAnnotation(Deprecated.class) == null && method.getParameterTypes().length == 1) { | ||||
|                     methodToUse = method; | ||||
|                     methodName = method.getName(); | ||||
|                     Class<?>[] types = method.getParameterTypes(); | ||||
|                     break; | ||||
|                 } | ||||
|             } | ||||
|             if (methodToUse == null) { | ||||
|                 throw new Exception(ChatColor.RED + "Cannot find the option " + methodName); | ||||
|             } | ||||
|             methodName = methodToUse.getName(); | ||||
|             Class<?>[] types = methodToUse.getParameterTypes(); | ||||
|             if (types.length == 1) { | ||||
|                 Class param = types[0]; | ||||
|                 // Parse to number | ||||
| @@ -397,12 +403,6 @@ public abstract class BaseDisguiseCommand implements CommandExecutor { | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|                     break; | ||||
|                 } | ||||
|             } | ||||
|             if (methodToUse == null) { | ||||
|                 throw new Exception(ChatColor.RED + "Cannot find the option " + methodName); | ||||
|             } | ||||
|             if (!usedOptions.contains(methodName.toLowerCase())) { | ||||
|                 usedOptions.add(methodName.toLowerCase()); | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user