mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
The defender isn't necessarily a player here
Besides, the defender doesn’t need to have the player data key anyways
This commit is contained in:
parent
d9c04a09ba
commit
9f9de86d21
@ -143,7 +143,7 @@ public class EntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UserManager.hasPlayerDataKey(defender) || !defender.isValid() || !(defender instanceof LivingEntity)) {
|
if (Misc.isNPCEntity(defender) || !defender.isValid() || !(defender instanceof LivingEntity)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ public final class CombatUtils {
|
|||||||
if (attacker instanceof Player && entityType == EntityType.PLAYER) {
|
if (attacker instanceof Player && entityType == EntityType.PLAYER) {
|
||||||
Player player = (Player) attacker;
|
Player player = (Player) attacker;
|
||||||
|
|
||||||
if (Misc.isNPCEntity(player)) {
|
if (!UserManager.hasPlayerDataKey(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user