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 Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Map<org.bukkit.attribute.Attribute, org.bukkit.attribute.AttributeModifier> protected int[]protected intprotected booleanprotected Set<org.bukkit.inventory.ItemFlag> protected Stringprotected booleanprotected studio.magemonkey.codex.api.items.ItemTypeprotected intprotected final QModuleDrop<?> protected Stringprotected DivinityFields inherited from class studio.magemonkey.codex.manager.LoadableItem
cfg, id, path -
Constructor Summary
ConstructorsConstructorDescriptionModuleItem(Divinity plugin, String path, QModuleDrop<?> module) Deprecated.ModuleItem(Divinity plugin, studio.magemonkey.codex.config.api.JYML cfg, QModuleDrop<?> module) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringapplyLoreReplacements(String lore) This method just returns the same string by default, but can be overridden to apply custom replacements.protected org.bukkit.inventory.ItemStackbuild()protected org.bukkit.inventory.ItemStackbuild(org.bukkit.inventory.ItemStack item) org.bukkit.inventory.ItemStackcreate()int[]getColor()Set<org.bukkit.inventory.ItemFlag> getFlags()getLore()studio.magemonkey.codex.api.items.ItemTypeQModuleDrop<?> getName()booleanprotected voidprocessLore(studio.magemonkey.codex.config.api.JYML cfg, QModuleDrop<?> module) protected voidsave(studio.magemonkey.codex.config.api.JYML cfg) Methods inherited from class studio.magemonkey.codex.manager.LoadableItem
getConfig, getFile, getId, save
-
Field Details
-
module
-
plugin
-
name
-
material
protected studio.magemonkey.codex.api.items.ItemType material -
lore
-
modelData
protected int modelData -
durability
protected int durability -
color
protected int[] color -
enchanted
protected boolean enchanted -
hash
-
flags
-
isUnbreakable
protected boolean isUnbreakable -
enchants
-
armorTrim
-
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
This method just returns the same string by default, but can be overridden to apply custom replacements. For example,LeveledItemuses 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:
savein classstudio.magemonkey.codex.manager.LoadableItem
-
getName
-
getMaterial
@NotNull public studio.magemonkey.codex.api.items.ItemType getMaterial() -
getLore
-
getColor
public int[] getColor() -
getFlags
-
isUnbreakable
public boolean isUnbreakable() -
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)
-