mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Fix incorrect detection of hostile and ambient creatures.
This commit is contained in:
parent
da032cb04e
commit
38c9479385
@ -422,7 +422,7 @@ public void onDamageEntity(DamageEntityEvent event) {
|
||||
String what;
|
||||
|
||||
/* Hostile / ambient mob override */
|
||||
if (isWhitelistedEntity(event.getEntity()) || (rootCause instanceof Entity && isWhitelistedEntity((Entity) rootCause))) {
|
||||
if (Entities.isHostile(event.getEntity()) || Entities.isAmbient(event.getEntity())) {
|
||||
canDamage = event.getRelevantFlags().isEmpty() || query.testState(target, associable, combine(event));
|
||||
what = "hit that";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user