Don't blow disguises if the event was cancelled

This commit is contained in:
libraryaddict 2014-07-12 08:52:17 +12:00
parent 98681cd93b
commit 6696060105

View File

@ -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());
}