mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 23:27:35 +01:00
Allow EnderPearls to damage the player who threw them in no-pvp areas
This commit is contained in:
parent
5f0ca37879
commit
d6939b7916
@ -30,6 +30,7 @@
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.EnderDragon;
|
||||
import org.bukkit.entity.EnderPearl;
|
||||
import org.bukkit.entity.Enderman;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@ -379,6 +380,7 @@ private void onEntityDamageByProjectile(EntityDamageByEntityEvent event) {
|
||||
// Check Player
|
||||
// if (event.getDamager() instanceof EnderPearl || event.getDamager() instanceof Snowball) return;
|
||||
if (attacker != null && attacker instanceof Player) {
|
||||
if (event.getDamager() instanceof EnderPearl && attacker == player) return;
|
||||
if (wcfg.useRegions) {
|
||||
Vector pt = toVector(defender.getLocation());
|
||||
Vector pt2 = toVector(attacker.getLocation());
|
||||
|
Loading…
Reference in New Issue
Block a user