mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Did a requested change.
This commit is contained in:
parent
942bf436bb
commit
b6112e2728
@ -88,10 +88,12 @@ public class EnchantmentRune extends SimpleSlimefunItem<ItemDropHandler> {
|
||||
Item entity = (Item) optional.get();
|
||||
ItemStack target = entity.getItemStack();
|
||||
|
||||
List<Enchantment> applicableEnchantmentList = new ArrayList<>(applicableEnchantments.getOrDefault(target.getType(), new ArrayList<>()));
|
||||
if (applicableEnchantmentList.isEmpty()) {
|
||||
List<Enchantment> applicableEnchantmentList = applicableEnchantments.get(target.getType());
|
||||
if (applicableEnchantmentList == null) {
|
||||
SlimefunPlugin.getLocal().sendMessage(p, "messages.enchantment-rune.fail", true);
|
||||
return;
|
||||
} else {
|
||||
applicableEnchantmentList = new ArrayList<>(applicableEnchantmentList);
|
||||
}
|
||||
|
||||
//Removing the enchantments that the item already has from enchantmentSet
|
||||
|
Loading…
Reference in New Issue
Block a user