mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fix issue with EntityDamageByEntityEvents & Offline Players
This commit is contained in:
parent
0c1a8eff85
commit
565ef693ce
@ -75,11 +75,19 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attacker instanceof Player && defender instanceof Player) {
|
if (defender instanceof Player) {
|
||||||
if (PartyManager.getInstance().inSameParty((Player) defender, (Player) attacker)) {
|
Player defendingPlayer = (Player) defender;
|
||||||
event.setCancelled(true);
|
|
||||||
|
if (!defendingPlayer.isOnline()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (attacker instanceof Player) {
|
||||||
|
if (PartyManager.getInstance().inSameParty(defendingPlayer, (Player) attacker)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for invincibility */
|
/* Check for invincibility */
|
||||||
|
Loading…
Reference in New Issue
Block a user