mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Fixed splash
This commit is contained in:
parent
4639330ad0
commit
fb9c51a1ac
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user