Class EnchantmentMock

java.lang.Object
org.bukkit.enchantments.Enchantment
be.seeseemelk.mockbukkit.enchantments.EnchantmentMock
All Implemented Interfaces:
net.kyori.adventure.key.Keyed, net.kyori.adventure.translation.Translatable, Keyed, Translatable

public class EnchantmentMock extends Enchantment
Mock implementation of an Enchantment.
  • Constructor Details

    • EnchantmentMock

      public EnchantmentMock(NamespacedKey key, EnchantmentTarget target, boolean treasure, boolean cursed, int maxLevel, int startLevel, String name, net.kyori.adventure.text.Component[] displayNames, int[] minModifiedCost, int[] maxModifiedCost, boolean tradeable, boolean discoverable, EnchantmentRarity rarity, Set<NamespacedKey> conflicts)
      Parameters:
      key - The key representing this enchantment
      target - the item targets of this enchantment
      treasure - Whether this enchantment can be found in a treasure
      cursed - Whether this enchantment is a curse
      maxLevel - The max level of this enchantment
      startLevel - The min level of this enchantment
      name - The name of the enchantment
      displayNames - The display name of the enchantment dependent on level
      minModifiedCost - The minimal modified cost for this enchantment dependent on level
      maxModifiedCost - The maximal modified cost for this enchantment dependent on level
      tradeable - Whether this enchantment can be obtained from trades
      discoverable - Whether this enchantment is in a loot table
      rarity - The rarity of this enchantment
      conflicts - Namespaced-keys of enchantments that are conflicting with this enchantment
    • EnchantmentMock

      @Deprecated(forRemoval=true) public EnchantmentMock(com.google.gson.JsonObject data)
      Parameters:
      data - Json data
  • Method Details