Package io.github.lucfr1746.llibrary
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic net.kyori.adventure.platform.bukkit.BukkitAudiencesGets the Adventure API's audience manager.static net.milkbowl.vault.economy.EconomyGets the Vault economy handler.static LLibraryGets the instance of this plugin.static InventoryManagerGets the instance of the InventoryManager.static net.milkbowl.vault.permission.PermissionGets the Vault permission handler.static LoggerGets the custom logger for this plugin.static booleanChecks if Paper API is available.static booleanChecks if PlaceholderAPI is enabled.static booleanChecks if Vault is enabled.voidCalled when the plugin is disabled.voidonEnable()Called when the plugin is enabled.voidonLoad()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, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
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:
onLoadin interfaceorg.bukkit.plugin.Plugin- Overrides:
onLoadin classorg.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:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.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:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
getInstance
Gets the instance of this plugin.- Returns:
- The LLibrary plugin instance.
-
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
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:
trueif Paper API is hooked, otherwisefalse.
-
isVaultEnabled
public static boolean isVaultEnabled()Checks if Vault is enabled.- Returns:
trueif Vault is enabled, otherwisefalse.
-
isPlaceholderAPIEnabled
public static boolean isPlaceholderAPIEnabled()Checks if PlaceholderAPI is enabled.- Returns:
trueif PlaceholderAPI is enabled, otherwisefalse.
-