Class AdvancedCorePlugin

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.bencodez.advancedcore.AdvancedCorePlugin
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public abstract class AdvancedCorePlugin extends org.bukkit.plugin.java.JavaPlugin
Abstract base class for plugins that use AdvancedCore. Provides core functionality for user management, rewards, permissions, and more.
  • Field Details

    • vaultHandler

      public VaultHandler vaultHandler
      Handler for Vault integration.
  • Constructor Details

    • AdvancedCorePlugin

      public AdvancedCorePlugin()
  • Method Details

    • getInstance

      public static AdvancedCorePlugin getInstance()
      Gets the singleton instance of this plugin.
      Returns:
      the plugin instance
    • setInstance

      public static void setInstance(AdvancedCorePlugin plugin)
      Sets the singleton instance of this plugin.
      Parameters:
      plugin - the plugin instance to set
    • addUserStartup

      public void addUserStartup(UserStartup start)
      Adds a user startup task to be executed on plugin startup.
      Parameters:
      start - the startup task to add
    • allowDownloadingFromSpigot

      public void allowDownloadingFromSpigot(int resourceId)
      Allows downloading plugin updates from Spigot.
      Parameters:
      resourceId - the Spigot resource ID
    • checkPluginUpdate

      public void checkPluginUpdate()
      Checks for plugin updates in the background.
    • convertDataStorage

      public void convertDataStorage(UserStorage from, UserStorage to)
      Converts data from one storage type to another.
      Parameters:
      from - the source storage type
      to - the target storage type
    • debug

      public void debug(com.bencodez.simpleapi.debug.DebugLevel debugLevel, String debug)
      Logs a debug message at the specified debug level.
      Parameters:
      debugLevel - the debug level
      debug - the debug message
    • debug

      public void debug(Throwable e)
      Show exception in console if debug is on
      Parameters:
      e - Exception
    • debug

      public void debug(String debug)
      Logs a debug message at INFO level.
      Parameters:
      debug - the debug message
    • devDebug

      public void devDebug(String debug)
      Logs a debug message at DEV level.
      Parameters:
      debug - the debug message
    • extraDebug

      public void extraDebug(String debug)
      Logs a debug message at EXTRA level.
      Parameters:
      debug - the debug message
    • getSQLiteUserTable

      public UserTable getSQLiteUserTable()
      Gets the SQLite user table.
      Returns:
      the user table, or null if not using SQLite
    • getStorageType

      public UserStorage getStorageType()
      Gets the current storage type configuration.
      Returns:
      the storage type
    • getUserManager

      public UserManager getUserManager()
      Gets the user manager instance.
      Returns:
      the user manager
    • isMySQLOkay

      public boolean isMySQLOkay()
      Checks if MySQL connection is okay.
      Returns:
      true if not using MySQL or if MySQL is connected, false otherwise
    • loadAdvancedCoreEvents

      public void loadAdvancedCoreEvents()
      Loads AdvancedCore event listeners.
    • loadHook

      public void loadHook()
      Load AdvancedCore hook
    • loadTabComplete

      public void loadTabComplete()
      Loads tab completion options.
    • loadUserAPI

      public void loadUserAPI(UserStorage storageType)
      Loads user API for specified storage type.
      Parameters:
      storageType - the storage type to load
    • loadVault

      public void loadVault()
      Loads Vault integration.
    • onDisable

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

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onPostLoad

      public abstract void onPostLoad()
      Called after plugin loads. Subclasses must implement this method.
    • onPreLoad

      public abstract void onPreLoad()
      Called before plugin loads. Subclasses must implement this method.
    • onUnLoad

      public abstract void onUnLoad()
      Called when plugin unloads. Subclasses must implement this method.
    • registerBungeeChannels

      public void registerBungeeChannels(String name)
      Registers BungeeCord messaging channels.
      Parameters:
      name - the channel name
    • registerEvents

      public void registerEvents(org.bukkit.event.Listener listener)
      Registers a listener.
      Parameters:
      listener - the listener to register
    • reload

      public abstract void reload()
      Reloads plugin configuration. Subclasses must implement this method.
    • reloadAdvancedCore

      @Deprecated public void reloadAdvancedCore()
      Deprecated.
      Reloads AdvancedCore configuration.
    • reloadAdvancedCore

      public void reloadAdvancedCore(boolean userStorage)
      Reloads AdvancedCore configuration.
      Parameters:
      userStorage - whether to reload user storage
    • setConfigData

      @Deprecated public void setConfigData(org.bukkit.configuration.ConfigurationSection configData)
      Deprecated.
      Parameters:
      configData - the configData to set
    • setConfigData

      public void setConfigData(com.bencodez.simpleapi.file.YMLConfig ymlConfig)
      Sets configuration data.
      Parameters:
      ymlConfig - the configuration to set
    • setMysql

      public void setMysql(MySQL mysql)
      Sets the MySQL database connection.
      Parameters:
      mysql - the mysql connection to set
    • userStartup

      public void userStartup()
      Runs user startup tasks.