From 370e72d9bc740a85de44ce9f9ff39825efa8fbba Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 18 Nov 2013 04:29:38 +1300 Subject: [PATCH] Don't display deprecated methods for disguise help. --- .../libraryaddict/disguise/commands/DisguiseHelpCommand.java | 3 ++- src/me/libraryaddict/disguise/events/UndisguiseEvent.java | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java b/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java index a83ab48d..d422d4df 100644 --- a/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java +++ b/src/me/libraryaddict/disguise/commands/DisguiseHelpCommand.java @@ -81,7 +81,8 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand { Class watcher = type.getWatcherClass(); try { for (Method method : watcher.getMethods()) { - if (!method.getName().startsWith("get") && method.getParameterTypes().length == 1) { + if (!method.getName().startsWith("get") && method.getParameterTypes().length == 1 + && method.getAnnotation(Deprecated.class) == null) { Class c = method.getParameterTypes()[0]; String valueType = null; if (c == String.class) { diff --git a/src/me/libraryaddict/disguise/events/UndisguiseEvent.java b/src/me/libraryaddict/disguise/events/UndisguiseEvent.java index fad68e35..18f3baeb 100644 --- a/src/me/libraryaddict/disguise/events/UndisguiseEvent.java +++ b/src/me/libraryaddict/disguise/events/UndisguiseEvent.java @@ -18,7 +18,6 @@ public class UndisguiseEvent extends Event implements Cancellable { private Disguise disguise; private Entity disguised; - private boolean isCancelled; public UndisguiseEvent(Entity entity, Disguise disguise) {