From 3be586607507d58a2d863f250be38343f028bf2b Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sun, 11 Apr 2021 20:58:14 +0100 Subject: [PATCH] Fixed Aiming --- .../ecoenchants/enchantments/ecoenchants/special/Aiming.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java index 8be82e82..782e092e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/special/Aiming.java @@ -74,9 +74,10 @@ public class Aiming extends EcoEnchant { Runnable runnable = this.getPlugin().getRunnableFactory().create(bukkitRunnable -> { List nearbyEntities = (List) (List) Arrays.asList(arrow.getNearbyEntities(finalDistance, finalDistance, finalDistance).stream() .filter(entity -> entity instanceof LivingEntity) + .map(entity -> (LivingEntity) entity) .filter(entity -> !entity.equals(player)) .filter(entity -> !(entity instanceof Enderman)) - .filter(entity -> !AntigriefManager.canInjure(player, (LivingEntity) entity)) + .filter(entity -> AntigriefManager.canInjure(player, entity)) .filter(entity -> { if (entity instanceof Player) { return ((Player) entity).getGameMode().equals(GameMode.SURVIVAL) || ((Player) entity).getGameMode().equals(GameMode.ADVENTURE);