mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Fixed onDeflect bug
This commit is contained in:
parent
b71dde1dfd
commit
71437e9eb4
@ -11,6 +11,7 @@ import com.willfp.eco.core.integrations.mcmmo.McmmoManager;
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.libreforge.LibReforgeUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.AbstractArrow;
|
||||
@ -732,7 +733,9 @@ public class WatcherTriggers extends PluginDependent<EcoPlugin> implements Liste
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(event.getDamager() instanceof LivingEntity attacker)) {
|
||||
LivingEntity attacker = LibReforgeUtils.tryAsPlayer(event.getDamager());
|
||||
|
||||
if (attacker == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user