mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-26 20:27:38 +01:00
Prevented Incandescence working from thorns damage
This commit is contained in:
parent
1a69a548f9
commit
f894572e34
@ -9,6 +9,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class Incandescence extends EcoEnchant {
|
||||
@ -19,6 +20,10 @@ public class Incandescence extends EcoEnchant {
|
||||
}
|
||||
@EventHandler
|
||||
public void onIncandescenceHurt(@NotNull final EntityDamageByEntityEvent event) {
|
||||
if (event.getCause() == EntityDamageEvent.DamageCause.THORNS) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(event.getEntity() instanceof Player)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user