Class LLibrary

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
io.github.lucfr1746.llibrary.LLibrary
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public final class LLibrary extends org.bukkit.plugin.java.JavaPlugin
The main class for the LLibrary plugin. This serves as the core plugin that manages initialization, enabling, and disabling logic.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.kyori.adventure.platform.bukkit.BukkitAudiences
    Gets the Adventure API's audience manager.
    static net.milkbowl.vault.economy.Economy
    Gets the Vault economy handler.
    static LLibrary
    Gets the instance of this plugin.
    Gets the instance of the InventoryManager.
    static net.milkbowl.vault.permission.Permission
    Gets the Vault permission handler.
    static Logger
    Gets the custom logger for this plugin.
    static boolean
    Checks if Paper API is available.
    static boolean
    Checks if PlaceholderAPI is enabled.
    static boolean
    Checks if Vault is enabled.
    void
    Called when the plugin is disabled.
    void
    Called when the plugin is enabled.
    void
    Called when the plugin is loaded before the server starts.

    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
  • Constructor Details

    • LLibrary

      public LLibrary()
  • Method Details

    • onLoad

      public void onLoad()
      Called when the plugin is loaded before the server starts. Initializes the plugin instance and plugin loader.
      Specified by:
      onLoad in interface org.bukkit.plugin.Plugin
      Overrides:
      onLoad in class org.bukkit.plugin.java.JavaPlugin
    • onEnable

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

      public void onDisable()
      Called when the plugin is disabled. Ensures the plugin loader is initialized and stops it.
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • getInstance

      public static LLibrary getInstance()
      Gets the instance of this plugin.
      Returns:
      The LLibrary plugin instance.
    • getInventoryManager

      public static InventoryManager getInventoryManager()
      Gets the instance of the InventoryManager.

      This method retrieves the InventoryManager from the plugin loader, allowing access to inventory-related operations such as opening, closing, and managing custom GUIs.

      Returns:
      the InventoryManager instance currently managed by the plugin loader
    • getPluginLogger

      public static Logger getPluginLogger()
      Gets the custom logger for this plugin.
      Returns:
      The plugin's logger.
    • getAudiences

      public static net.kyori.adventure.platform.bukkit.BukkitAudiences getAudiences()
      Gets the Adventure API's audience manager.
      Returns:
      The BukkitAudiences instance.
    • getEconomy

      public static net.milkbowl.vault.economy.Economy getEconomy()
      Gets the Vault economy handler.
      Returns:
      The economy handler, or null if Vault is not hooked.
    • getPermission

      public static net.milkbowl.vault.permission.Permission getPermission()
      Gets the Vault permission handler.
      Returns:
      The permission handler, or null if Vault is not hooked.
    • hasPaperAPI

      public static boolean hasPaperAPI()
      Checks if Paper API is available.
      Returns:
      true if Paper API is hooked, otherwise false.
    • isVaultEnabled

      public static boolean isVaultEnabled()
      Checks if Vault is enabled.
      Returns:
      true if Vault is enabled, otherwise false.
    • isPlaceholderAPIEnabled

      public static boolean isPlaceholderAPIEnabled()
      Checks if PlaceholderAPI is enabled.
      Returns:
      true if PlaceholderAPI is enabled, otherwise false.