From 4e72ad359c182bf61ef9a65986939e059869ba8e Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 24 Nov 2013 09:16:04 +1300 Subject: [PATCH] Don't let the disguisers use deprecated methods --- .../libraryaddict/disguise/utilities/BaseDisguiseCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java b/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java index 44fb1c37..e76bce7d 100644 --- a/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java +++ b/src/me/libraryaddict/disguise/utilities/BaseDisguiseCommand.java @@ -235,7 +235,8 @@ public abstract class BaseDisguiseCommand implements CommandExecutor { Method methodToUse = null; Object value = null; 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) { methodToUse = method; methodName = method.getName(); Class[] types = method.getParameterTypes();