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.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.static InventoryManager
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
onEnable()
Called when the plugin is enabled.void
onLoad()
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
-
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 interfaceorg.bukkit.plugin.Plugin
- Overrides:
onLoad
in 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:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in 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:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in 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:
true
if Paper API is hooked, otherwisefalse
.
-
isVaultEnabled
public static boolean isVaultEnabled()Checks if Vault is enabled.- Returns:
true
if Vault is enabled, otherwisefalse
.
-
isPlaceholderAPIEnabled
public static boolean isPlaceholderAPIEnabled()Checks if PlaceholderAPI is enabled.- Returns:
true
if PlaceholderAPI is enabled, otherwisefalse
.
-