mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-30 20:48:19 +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 (PartyManager.getInstance().inSameParty((Player) defender, (Player) attacker)) {
|
||||
event.setCancelled(true);
|
||||
if (defender instanceof Player) {
|
||||
Player defendingPlayer = (Player) defender;
|
||||
|
||||
if (!defendingPlayer.isOnline()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (attacker instanceof Player) {
|
||||
if (PartyManager.getInstance().inSameParty(defendingPlayer, (Player) attacker)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for invincibility */
|
||||
|
Loading…
Reference in New Issue
Block a user