From dde187e7e7945b8aaa28ceedcd0d6a3d71bc3c29 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 8 Mar 2022 08:33:18 +0000 Subject: [PATCH] Fixed beheading --- .../enchantments/ecoenchants/normal/Beheading.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java index b9d2ffde..c0fdd182 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Beheading.java @@ -3,6 +3,7 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; import com.willfp.eco.core.drops.DropQueue; import com.willfp.eco.core.items.builder.SkullBuilder; import com.willfp.ecoenchants.enchantments.EcoEnchant; +import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import com.willfp.ecoenchants.enchantments.util.EnchantChecks; import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils; @@ -90,13 +91,12 @@ public class Beheading extends EcoEnchant { event.setDroppedExp(0); } - ItemStack getHead(@NotNull final EntityType type) { - for (String s : this.getConfig().getStrings("custom-heads")) { + private ItemStack getHead(@NotNull final EntityType type) { + for (String s : this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "custom-heads")) { String[] split = s.split("::"); - if (!type.name().equalsIgnoreCase(split[0])) { - continue; + if (type.name().equalsIgnoreCase(split[0])) { + return new SkullBuilder().setSkullTexture(split[1]).build(); } - return new SkullBuilder().setSkullTexture(split[1]).build(); } return null; }