From 1a063d71089c8fa1966e4dc1623ba89813709495 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sun, 20 Dec 2020 12:02:03 +0000 Subject: [PATCH] Fixed tectonic --- .../ecoenchants/enchantments/ecoenchants/normal/Tectonic.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java b/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java index 04d98062..1dc4aab7 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tectonic.java @@ -2,8 +2,10 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; +import com.willfp.ecoenchants.integrations.antigrief.AntigriefManager; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityDamageEvent; import java.util.Collection; @@ -33,6 +35,8 @@ public class Tectonic extends EcoEnchant { continue; if(!(entity instanceof LivingEntity)) continue; entity.teleport(entity.getLocation().add(0, 0.3, 0)); + if(faller instanceof Player && !AntigriefManager.canInjure((Player) faller, (LivingEntity) entity)) + return; ((LivingEntity) entity).damage(damage); } }