java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
me.github.simonplays15.betterbansystem.spigot.SpigotCore
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class SpigotCore extends org.bukkit.plugin.java.JavaPlugin
Represents the core plugin class for Spigot.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected SpigotCore
    The `instance` variable represents an instance of the `SpigotCore` class, which is a core plugin class for Spigot.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called when the plugin is being disabled.
    void
    Called when the plugin is enabled.
    void
    This method is called when the plugin is being loaded by the server.

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • instance

      protected SpigotCore instance
      The `instance` variable represents an instance of the `SpigotCore` class, which is a core plugin class for Spigot.

      This variable is declared as `protected`, which means it can be accessed by subclasses within the same package and by subclasses in different packages.

      The purpose of this variable is to hold a reference to the running plugin instance. It is assigned with the value of `this` in the `onEnable()` method.

      This variable can be accessed by other methods within the `SpigotCore` class or its subclasses to access the running plugin object.

      Example usage:

      SpigotCore plugin = instance;

      See Also:
  • Constructor Details

    • SpigotCore

      public SpigotCore()
  • Method Details

    • onEnable

      public void onEnable()
      Called when the plugin is enabled.
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      This method is called when the plugin is being disabled.

      During the onDisable() method, any clean up or finalization tasks can be performed. This method is usually used to save data, close connections, or perform any necessary cleanup operations before the plugin is completely shut down.

      Note that when the plugin is disabled, it will no longer receive events or be able to execute commands.

      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • onLoad

      public void onLoad()
      This method is called when the plugin is being loaded by the server. It is responsible for any necessary preloading tasks or initializations.

      This method is automatically called by the Spigot server and should not be called manually.

      Note: This method does not have a specific implementation in the given code sample. Developers should extend this class and override the `onLoad` method to provide any specific functionality required during plugin loading.

      Specified by:
      onLoad in interface org.bukkit.plugin.Plugin
      Overrides:
      onLoad in class org.bukkit.plugin.java.JavaPlugin
      See Also: