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,12 +75,20 @@ public class EntityListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (attacker instanceof Player && defender instanceof Player) {
|
||||
if (PartyManager.getInstance().inSameParty((Player) defender, (Player) attacker)) {
|
||||
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 */
|
||||
if (defender instanceof LivingEntity) {
|
||||
|
Loading…
Reference in New Issue
Block a user