Class SquirtgunPlugin<P extends Platform>

java.lang.Object
net.lucypoulton.squirtgun.plugin.SquirtgunPlugin<P>
Type Parameters:
P - a Platform. If not required, use the default platform implementation.

public abstract class SquirtgunPlugin<P extends Platform> extends Object
A plugin written using the Squirtgun API.
Since:
2.0.0
  • Constructor Details

    • SquirtgunPlugin

      public SquirtgunPlugin(@NotNull P platform)
  • Method Details

    • log

      public void log(String text)
      Logs a prefixed text message to the console. TODO - do we really need this?
      Parameters:
      text - the text to log
    • getPlatform

      @NotNull public P getPlatform()
      Gets the platform-specific object provided in the constructor.
    • getPluginName

      @NotNull public abstract @NotNull String getPluginName()
      Gets the plugin's name.
    • getPluginVersion

      @NotNull public abstract @NotNull SemanticVersion getPluginVersion()
      Gets the plugin's version.
    • getAuthors

      @NotNull public abstract @NotNull String[] getAuthors()
      Gets a list of the authors' names.
    • reload

      public void reload()
      Dispatches a PluginReloadEvent.
    • onEnable

      public void onEnable()
      Called when the plugin is enabled. By default, does nothing.
    • onDisable

      public void onDisable()
      Called when the plugin is disabled. By default, does nothing.