All Implemented Interfaces:
Placeable

public class MagicianTalisman extends Talisman
The MagicianTalisman is a special kind of Talisman which awards a Player with an extra Enchantment when they enchant their ItemStack.
Author:
TheBusyBiscuit
  • Constructor Details

    • MagicianTalisman

      @ParametersAreNonnullByDefault public MagicianTalisman(SlimefunItemStack item, org.bukkit.inventory.ItemStack[] recipe)
  • Method Details

    • getRandomEnchantment

      @Nullable public TalismanEnchantment getRandomEnchantment(@Nonnull org.bukkit.inventory.ItemStack item, @Nonnull Set<org.bukkit.enchantments.Enchantment> existingEnchantments)
      This method picks a random TalismanEnchantment for the provided ItemStack. The method will return null, if null was provided or no applicable Enchantment was found.
      Parameters:
      item - The ItemStack to find an Enchantment for
      existingEnchantments - A Set containing the Enchantments that currently exist on the ItemStack
      Returns:
      An applicable TalismanEnchantment or null
    • isEnchantmentBookAllowed

      public boolean isEnchantmentBookAllowed()
      This method checks whether enchantment books can be given an extra Enchantment or not.
      Returns:
      Whether enchantment books can receive an extra Enchantment