Fixed a bug with a existing method having the same name as a method with no args
This commit is contained in:
parent
d16da8d26f
commit
3709db548a
@ -237,7 +237,7 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
|
|||||||
Object value = null;
|
Object value = null;
|
||||||
for (Method method : disguise.getWatcher().getClass().getMethods()) {
|
for (Method method : disguise.getWatcher().getClass().getMethods()) {
|
||||||
if (!method.getName().startsWith("get") && method.getName().equalsIgnoreCase(methodName)
|
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;
|
methodToUse = method;
|
||||||
methodName = method.getName();
|
methodName = method.getName();
|
||||||
Class<?>[] types = method.getParameterTypes();
|
Class<?>[] types = method.getParameterTypes();
|
||||||
|
Loading…
Reference in New Issue
Block a user