From 3709db548ae253d7b5d6e4f72368955fedc102bb Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 4 Apr 2014 18:32:49 +1300 Subject: [PATCH] Fixed a bug with a existing method having the same name as a method with no args --- .../libraryaddict/disguise/utilities/BaseDisguiseCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java b/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java index 427737bc..ecd158e1 100644 --- a/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java +++ b/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java @@ -237,7 +237,7 @@ public abstract class BaseDisguiseCommand implements CommandExecutor { Object value = null; for (Method method : disguise.getWatcher().getClass().getMethods()) { if (!method.getName().startsWith("get") && method.getName().equalsIgnoreCase(methodName) - && method.getAnnotation(Deprecated.class) == null) { + && method.getAnnotation(Deprecated.class) == null && method.getParameterTypes().length == 1) { methodToUse = method; methodName = method.getName(); Class[] types = method.getParameterTypes();