mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-17 04:41:21 +01:00
Fixed beheading
This commit is contained in:
parent
33cda127f9
commit
dde187e7e7
@ -3,6 +3,7 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
|||||||
import com.willfp.eco.core.drops.DropQueue;
|
import com.willfp.eco.core.drops.DropQueue;
|
||||||
import com.willfp.eco.core.items.builder.SkullBuilder;
|
import com.willfp.eco.core.items.builder.SkullBuilder;
|
||||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||||
|
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||||
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
import com.willfp.ecoenchants.enchantments.util.EnchantChecks;
|
||||||
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||||
@ -90,14 +91,13 @@ public class Beheading extends EcoEnchant {
|
|||||||
event.setDroppedExp(0);
|
event.setDroppedExp(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack getHead(@NotNull final EntityType type) {
|
private ItemStack getHead(@NotNull final EntityType type) {
|
||||||
for (String s : this.getConfig().getStrings("custom-heads")) {
|
for (String s : this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "custom-heads")) {
|
||||||
String[] split = s.split("::");
|
String[] split = s.split("::");
|
||||||
if (!type.name().equalsIgnoreCase(split[0])) {
|
if (type.name().equalsIgnoreCase(split[0])) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return new SkullBuilder().setSkullTexture(split[1]).build();
|
return new SkullBuilder().setSkullTexture(split[1]).build();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user