Don't blow disguises if the event was cancelled
This commit is contained in:
parent
98681cd93b
commit
6696060105
@ -81,9 +81,9 @@ public class DisguiseListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onAttack(EntityDamageByEntityEvent event) {
|
public void onAttack(EntityDamageByEntityEvent event) {
|
||||||
if (DisguiseConfig.isDisguiseBlownOnAttack()) {
|
if (DisguiseConfig.isDisguiseBlownOnAttack() && !event.isCancelled()) {
|
||||||
if (event.getEntity() instanceof Player) {
|
if (event.getEntity() instanceof Player) {
|
||||||
checkPlayerCanBlowDisguise((Player) event.getEntity());
|
checkPlayerCanBlowDisguise((Player) event.getEntity());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user