Class PluginExpansion

java.lang.Object
com.olziedev.playerauctions.api.expansion.PluginExpansion
Direct Known Subclasses:
Expansion

public abstract class PluginExpansion extends Object
Represents an expansion for it to be loaded and used in ExpansionRegistry.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    This variable is initialised when the expansion has been loaded and returns the PlayerWarps config instance.
    This variable is initialised when the expansion has been loaded and returns the PlayerWarps expansion config instance.
    This variable is initialised when the expansion has been loaded and returns the file of the expansion.
    boolean
    This variable is initialised when the expansion has been loaded and returns if the expansion is integrated into the plugin or if it has been manually registered using ExpansionRegistry.registerExpansion(PluginExpansion)
    This variable is initialised when the expansion has been loaded and returns the PlayerWarps plugin instance.
    This variable is initialised when the expansion has been loaded and returns the registry it was loaded in.
    This variable is initialised when the expansion has been loaded and returns the version of the expansion.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
     
    abstract boolean
     
    abstract void
    This method will be initialised if isEnabled() returns true on plugin enable.
    void
    The method that will be initialised before the entire plugin is loaded.
    void
    This method will be initialised when the addon is unloading.
    void
    This method to unload the expansion from the registry.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • plugin

      public OlziePluginAPI plugin
      This variable is initialised when the expansion has been loaded and returns the PlayerWarps plugin instance.
    • registry

      public ExpansionRegistry registry
      This variable is initialised when the expansion has been loaded and returns the registry it was loaded in.
    • expansionConfig

      public FileConfiguration expansionConfig
      This variable is initialised when the expansion has been loaded and returns the PlayerWarps expansion config instance.
    • config

      public FileConfiguration config
      This variable is initialised when the expansion has been loaded and returns the PlayerWarps config instance.
    • integrated

      public boolean integrated
      This variable is initialised when the expansion has been loaded and returns if the expansion is integrated into the plugin or if it has been manually registered using ExpansionRegistry.registerExpansion(PluginExpansion)
    • version

      public String version
      This variable is initialised when the expansion has been loaded and returns the version of the expansion.
    • file

      public File file
      This variable is initialised when the expansion has been loaded and returns the file of the expansion. This can return null if the expansion is integrated into the plugin.
  • Constructor Details

    • PluginExpansion

      public PluginExpansion()
  • Method Details

    • isEnabled

      public abstract boolean isEnabled()
      Returns:
      If the expansion is enabled in the configuration file and is loaded onto the server.
    • getName

      public abstract String getName()
      Returns:
      The name of the expansion that will be used in areas of the plugin.
    • onLoad

      public abstract void onLoad()
      This method will be initialised if isEnabled() returns true on plugin enable.
    • onPreLoad

      public void onPreLoad()
      The method that will be initialised before the entire plugin is loaded.
    • unload

      public void unload()
      This method to unload the expansion from the registry.
    • onUnload

      public void onUnload()
      This method will be initialised when the addon is unloading.