From 6696060105185f2eab3a9f62d1bd49aed5b89582 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 12 Jul 2014 08:52:17 +1200 Subject: [PATCH] Don't blow disguises if the event was cancelled --- src/me/libraryaddict/disguise/DisguiseListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseListener.java b/src/me/libraryaddict/disguise/DisguiseListener.java index 8b9f1293..c561c448 100644 --- a/src/me/libraryaddict/disguise/DisguiseListener.java +++ b/src/me/libraryaddict/disguise/DisguiseListener.java @@ -81,9 +81,9 @@ public class DisguiseListener implements Listener { } } - @EventHandler + @EventHandler(priority = EventPriority.HIGH) public void onAttack(EntityDamageByEntityEvent event) { - if (DisguiseConfig.isDisguiseBlownOnAttack()) { + if (DisguiseConfig.isDisguiseBlownOnAttack() && !event.isCancelled()) { if (event.getEntity() instanceof Player) { checkPlayerCanBlowDisguise((Player) event.getEntity()); }