Class ModuleItem

java.lang.Object
studio.magemonkey.codex.manager.LoadableItem
studio.magemonkey.divinity.modules.ModuleItem
Direct Known Subclasses:
CustomItemsManager.CustomItem, LeveledItem, MoneyManager.QMoney

public abstract class ModuleItem extends studio.magemonkey.codex.manager.LoadableItem
  • Field Details

    • module

      protected final QModuleDrop<?> module
    • plugin

      protected Divinity plugin
    • name

      protected String name
    • material

      protected studio.magemonkey.codex.api.items.ItemType material
    • lore

      protected List<String> lore
    • modelData

      protected int modelData
    • durability

      protected int durability
    • color

      protected int[] color
    • enchanted

      protected boolean enchanted
    • hash

      protected String hash
    • flags

      protected Set<org.bukkit.inventory.ItemFlag> flags
    • isUnbreakable

      protected boolean isUnbreakable
    • enchants

      protected Map<org.bukkit.enchantments.Enchantment,Integer> enchants
    • armorTrim

      protected String armorTrim
    • attributes

      protected Map<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> attributes
  • Constructor Details

    • ModuleItem

      @Deprecated public ModuleItem(@NotNull Divinity plugin, String path, QModuleDrop<?> module) throws org.bukkit.configuration.InvalidConfigurationException
      Deprecated.
      Throws:
      org.bukkit.configuration.InvalidConfigurationException
    • ModuleItem

      public ModuleItem(@NotNull Divinity plugin, @NotNull studio.magemonkey.codex.config.api.JYML cfg, @NotNull QModuleDrop<?> module)
  • Method Details

    • applyLoreReplacements

      protected String applyLoreReplacements(String lore)
      This method just returns the same string by default, but can be overridden to apply custom replacements. For example, LeveledItem uses this to replace the item tier placeholders.
      Parameters:
      lore - The lore line to apply replacements to.
      Returns:
      The lore line with replacements applied.
    • processLore

      protected void processLore(@NotNull studio.magemonkey.codex.config.api.JYML cfg, @NotNull QModuleDrop<?> module)
    • save

      protected void save(@NotNull studio.magemonkey.codex.config.api.JYML cfg)
      Specified by:
      save in class studio.magemonkey.codex.manager.LoadableItem
    • getName

      @NotNull public String getName()
    • getMaterial

      @NotNull public studio.magemonkey.codex.api.items.ItemType getMaterial()
    • getLore

      @NotNull public List<String> getLore()
    • getColor

      public int[] getColor()
    • getFlags

      public Set<org.bukkit.inventory.ItemFlag> getFlags()
    • isUnbreakable

      public boolean isUnbreakable()
    • getModule

      @NotNull public QModuleDrop<?> getModule()
    • create

      @NotNull public org.bukkit.inventory.ItemStack create()
    • build

      @NotNull protected org.bukkit.inventory.ItemStack build()
    • build

      @NotNull protected org.bukkit.inventory.ItemStack build(@NotNull org.bukkit.inventory.ItemStack item)