mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-25 15:35:11 +01:00
Fixed shockwave and infernal touch
This commit is contained in:
parent
0a35e86677
commit
8eef4b6449
@ -80,7 +80,7 @@ public class InfernalTouch extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getBlock().getState() instanceof Container) {
|
||||
if (event.getBlockState() instanceof Container) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.util.TridentUtils;
|
||||
import com.willfp.eco.util.integrations.antigrief.AntigriefManager;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -61,6 +62,7 @@ public class Shockwave extends EcoEnchant {
|
||||
.filter(entity1 -> entity1 instanceof LivingEntity)
|
||||
.filter(entity1 -> entity1 != player)
|
||||
.filter(entity1 -> !entity1.hasMetadata("shockwaved"))
|
||||
.filter(entity1 -> AntigriefManager.canInjure(player, (LivingEntity) entity1))
|
||||
.forEach((mob -> {
|
||||
((LivingEntity) mob).damage(finalDamage, entity);
|
||||
mob.setMetadata("shockwaved", this.getPlugin().getMetadataValueFactory().create(true));
|
||||
|
Loading…
Reference in New Issue
Block a user