Class SkriptPlugin

All Implemented Interfaces:
LifecycleEventOwner, CommandExecutor, TabCompleter, TabExecutor, Listener, Plugin

public class SkriptPlugin extends JavaPlugin implements Listener
  • Constructor Details

    • SkriptPlugin

      public SkriptPlugin()
  • Method Details

    • getInstance

      public static SkriptPlugin getInstance()
    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface Plugin
      Overrides:
      onEnable in class JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface Plugin
      Overrides:
      onDisable in class JavaPlugin
    • closeOnDisable

      public static void closeOnDisable(Closeable closeable)
      Registers a Closeable that should be closed when this plugin is disabled.

      All registered Closeables will be closed after all scripts have been stopped.

      Parameters:
      closeable - Closeable to register
    • getAddonInstance

      public SkriptAddon getAddonInstance()
      Returns:
      A SkriptAddon representing Skript.