From a14cb9aadd5132196365560d275f4e038fb2e6f3 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 29 Jun 2021 23:53:00 +1200 Subject: [PATCH] Add getDisguised() and getEntity() to un/disguise events --- .../java/me/libraryaddict/disguise/events/DisguiseEvent.java | 4 ++++ .../me/libraryaddict/disguise/events/UndisguiseEvent.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/events/DisguiseEvent.java b/src/main/java/me/libraryaddict/disguise/events/DisguiseEvent.java index af13c08a..713538d3 100644 --- a/src/main/java/me/libraryaddict/disguise/events/DisguiseEvent.java +++ b/src/main/java/me/libraryaddict/disguise/events/DisguiseEvent.java @@ -30,6 +30,10 @@ public class DisguiseEvent extends Event implements Cancellable { this(null, entity, disguise); } + public Entity getDisguised() { + return getEntity(); + } + @Override public HandlerList getHandlers() { return handlerList; diff --git a/src/main/java/me/libraryaddict/disguise/events/UndisguiseEvent.java b/src/main/java/me/libraryaddict/disguise/events/UndisguiseEvent.java index f15210e3..e9f4aad3 100644 --- a/src/main/java/me/libraryaddict/disguise/events/UndisguiseEvent.java +++ b/src/main/java/me/libraryaddict/disguise/events/UndisguiseEvent.java @@ -32,6 +32,10 @@ public class UndisguiseEvent extends Event implements Cancellable { this.isBeingReplaced = beingReplaced; } + public Entity getEntity() { + return getDisguised(); + } + @Override public HandlerList getHandlers() { return handlerList;