Interface XPrisonEnchantment

All Known Implementing Classes:
XPrisonEnchantmentBase

public interface XPrisonEnchantment
Represents a custom enchantment in the XPrison system.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the author of this enchantment.
    long
    Gets the base cost of applying this enchantment.
     
    int
    Gets the unique ID of this enchantment.
    long
    Gets the incremental cost added per level of this enchantment.
    int
    Gets the maximum enchantment level that can be applied.
    Gets the display name of the enchantment, including color codes.
    Gets the display name of the enchantment without color codes.
    Gets the raw name of the enchantment (without color codes).
    boolean
    Checks whether this enchantment is currently enabled.
    void
    Loads or initializes the enchantment from its configuration or internal state.
    void
    Unloads or disables the enchantment, freeing resources or unregistering listeners.
  • Method Details

    • getId

      int getId()
      Gets the unique ID of this enchantment.
      Returns:
      The unique enchantment ID.
    • getRawName

      String getRawName()
      Gets the raw name of the enchantment (without color codes).
      Returns:
      The raw enchantment name.
    • getName

      String getName()
      Gets the display name of the enchantment, including color codes.
      Returns:
      The colored enchantment name.
    • getNameWithoutColor

      String getNameWithoutColor()
      Gets the display name of the enchantment without color codes.
      Returns:
      The enchantment name without color codes.
    • getGuiProperties

    • getAuthor

      String getAuthor()
      Gets the author of this enchantment.
      Returns:
      The author name.
    • isEnabled

      boolean isEnabled()
      Checks whether this enchantment is currently enabled.
      Returns:
      True if the enchantment is enabled, false otherwise.
    • getMaxLevel

      int getMaxLevel()
      Gets the maximum enchantment level that can be applied.
      Returns:
      The maximum allowed level.
    • getBaseCost

      long getBaseCost()
      Gets the base cost of applying this enchantment.
      Returns:
      The base cost.
    • getIncreaseCost

      long getIncreaseCost()
      Gets the incremental cost added per level of this enchantment.
      Returns:
      The increase in cost per level.
    • load

      void load()
      Loads or initializes the enchantment from its configuration or internal state. Called when the enchantment is first created or reloaded.
    • unload

      void unload()
      Unloads or disables the enchantment, freeing resources or unregistering listeners.