From fb9c51a1ac6c5806d7a791ae28fccf4ce2a957d9 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 20 Oct 2020 15:50:21 +0100 Subject: [PATCH] Fixed splash --- .../enchantments/ecoenchants/normal/Splash.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java b/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java index 69687eda..56059825 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Splash.java @@ -3,13 +3,10 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.util.EnchantChecks; +import com.willfp.ecoenchants.integrations.antigrief.AntigriefManager; import com.willfp.ecoenchants.nms.TridentStack; import org.bukkit.Bukkit; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; -import org.bukkit.entity.Trident; +import org.bukkit.entity.*; import org.bukkit.event.EventHandler; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; @@ -56,6 +53,8 @@ public final class Splash extends EcoEnchant { if(e.equals(player)) continue; Bukkit.getPluginManager().callEvent(new EntityDamageByEntityEvent(trident, entity, EntityDamageEvent.DamageCause.ENTITY_ATTACK, damage)); + + if(!AntigriefManager.canInjure(player, entity)) continue; entity.damage(damage, trident); } }