Don't let the disguisers use deprecated methods

This commit is contained in:
libraryaddict 2013-11-24 09:16:04 +13:00
parent 698881f348
commit 4e72ad359c

View File

@ -235,7 +235,8 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
Method methodToUse = null; Method methodToUse = null;
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) {
methodToUse = method; methodToUse = method;
methodName = method.getName(); methodName = method.getName();
Class<?>[] types = method.getParameterTypes(); Class<?>[] types = method.getParameterTypes();