mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 08:06:54 +02:00
Ignore self damage in teleport entity protection.
This commit is contained in:
@@ -75,7 +75,7 @@ public class EssentialsEntityListener implements Listener
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport())
|
if (!attacker.equals(defender) && (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport()))
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
@@ -233,7 +233,7 @@ public class EssentialsProtectEntityListener implements Listener
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This code will prevent explosions near protected rails, signs or protected chests
|
// This code will prevent explosions near protected rails, signs or protected chests
|
||||||
// TODO: Use protect db instead of this code
|
// TODO: Use protect db instead of this code
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user