Fixed tectonic

This commit is contained in:
Auxilor 2020-12-20 12:02:03 +00:00
parent 5dc99151b4
commit 1a063d7108

View File

@ -2,8 +2,10 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchant;
import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.EcoEnchants;
import com.willfp.ecoenchants.integrations.antigrief.AntigriefManager;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent;
import java.util.Collection; import java.util.Collection;
@ -33,6 +35,8 @@ public class Tectonic extends EcoEnchant {
continue; continue;
if(!(entity instanceof LivingEntity)) continue; if(!(entity instanceof LivingEntity)) continue;
entity.teleport(entity.getLocation().add(0, 0.3, 0)); entity.teleport(entity.getLocation().add(0, 0.3, 0));
if(faller instanceof Player && !AntigriefManager.canInjure((Player) faller, (LivingEntity) entity))
return;
((LivingEntity) entity).damage(damage); ((LivingEntity) entity).damage(damage);
} }
} }