Class IntegrationManager
IntegrationManager class is responsible for managing the integration of various external plugins with the Graves plugin.
This class handles loading, unloading, and checking the availability of these integrations, allowing the Graves plugin to interact with other plugins.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChestSortIntegration with ChestSort, a plugin for sorting chests and inventories.private CitizensNPCIntegration with CitizensNPC, a plugin for creating NPCs.private CoreProtectIntegrationDeprecated.Unmaintained greedware plugin.private FancyNPCsIntegration with FancyNPCs, a plugin for managing player-like NPCs.private FloodgateIntegration with floodgateprivate FurnitureEngineDeprecated.Plugin no longer exists externally Integration with FurnitureEngine, another plugin for furniture management.private FurnitureLibIntegration with FurnitureLib, a plugin for furniture management.private booleanIndicates whether Vault Economy are available.private booleanIndicates whether Vault permissions are available.private ItemBridgeIntegration with ItemBridge, a plugin or library for item management.private ItemsAdderIntegration with ItemsAdder, a plugin for adding custom items.private LuckPermsHandlerHandles integration with LuckPerms, a permissions management plugin.private MineDownIntegration with MineDown, a library for Markdown-like text formatting.private MiniMessageIntegration with MiniMessage, a library for advanced message formatting.private MultiPaperIntegration with MultiPaper, a server software or library.private NexoIntegration with Nexo, a plugin for custom items and resource packs.private NoteBlockAPIHandles integration with NoteBlockAPI, a permissions management plugin.private OraxenIntegration with Oraxen, a plugin for custom items and resource packs.private PlaceholderAPIIntegration with PlaceholderAPI, a plugin for managing placeholders.private PlayerNPCIntegration with PlayerNPC, a plugin for managing player-like NPCs.private final GravesThe main plugin instance associated with Graves.private ProtectionLibIntegration with ProtectionLib, a library for protection management.private ProtocolLibIntegration with ProtocolLib, a library for handling protocol-related tasks.private SkriptImplIntegration with Skript, a plugin for scripting.private VaultIntegration with Vault, a permissions and economy API.private WorldEditIntegration with WorldEdit, a tool for editing worlds. -
Constructor Summary
ConstructorsConstructorDescriptionIntegrationManager(Graves plugin) Initializes a new instance of theIntegrationManagerclass. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks for known plugin managers that could cause compatibility issues.private voiddisableVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin) Disables the Vault integration if both economy and permissions are unavailable.private voidenableEconomyOnlyVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.economy.Economy> economyProvider) Enables Vault integration with only economy support.private voidenableFullVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.economy.Economy> economyProvider, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.permission.Permission> permissionProvider) Enables full Vault integration with both economy and permissions.private voidenablePermissionsOnlyVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.permission.Permission> permissionProvider) Enables Vault integration with only permissions support.private static StringextractNumericVersion(String input) Extracts the numeric version string from a full string (e.g., "v1.5.2-beta" → "1.5.2").Returns the instance of the ChestSort integration, if it is loaded.Returns the instance of the CitizensNPC integration, if it is loaded.Deprecated.Unmaintained greedware plugin.Returns the instance of the FancyNPCs integration, if it is loaded.Returns the instance of Floodgate integration, if it is loaded.Deprecated.Plugin no longer exists externally Returns the instance of the FurnitureEngine integration, if it is loaded.Returns the instance of the FurnitureLib integration, if it is loaded.Returns the instance of the ItemsAdder integration, if it is loaded.Returns the instance of the LuckPermsHandler, if it is loaded.Returns the instance of the MineDown integration, if it is loaded.Returns the instance of the MiniMessage integration, if it is loaded.Returns the instance of the MultiPaper integration, if it is loaded.getNexo()Returns the instance of the Nexo integration, if it is loaded.Returns the instance of the NoteBlockAPI integration, if it is loaded.Deprecated.Use Nexo instead.Returns the instance of the PlayerNPC integration, if it is loaded.Returns the instance of the ProtectionLib integration, if it is loaded.Returns the instance of the ProtocolLib integration, if it is loaded.ch.njol.skript.SkriptAddonReturns the SkriptAddon instance if Skript integration is loaded.getVault()Returns the instance of the Vault integration, if it is loaded.Returns the instance of the WorldEdit integration, if it is loaded.private voidhandleVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin) Handles the integration of the Vault plugin.booleanChecks if ChestSort integration is loaded.booleanChecks if CitizensNPC integration is loaded.booleanDeprecated.Unmaintained greedware plugin.booleanChecks if FancyNpcs is loaded.booleanReturns whether you are using floodgate.booleanDeprecated.Plugin no longer exists externally Checks if FurnitureEngine integration is loaded.booleanChecks if FurnitureLib integration is loaded.booleanChecks if ItemsAdder integration is loaded.booleanChecks if LuckPermsHandler is loaded.booleanChecks if MineDown integration is loaded.booleanChecks if MiniMessage integration is loaded.booleanChecks if MultiPaper integration is loaded.booleanhasNexo()Checks if Nexo integration is loaded.booleanChecks if NoteBlockAPI is loaded.booleanDeprecated.Use Nexo instead.booleanChecks if PlaceholderAPI integration is loaded.booleanChecks if PlayerNPC integration is loaded.booleanChecks if ProtectionLib integration is loaded.booleanChecks if ProtocolLib integration is loaded.booleanChecks if Skript integration is loaded.booleanhasVault()Checks if Vault integration is loaded.booleanbooleanChecks if Vault permissions provider is available.booleanChecks if WorldEdit integration is loaded.private booleanChecks if server is running Paper or Paper related forks.private static booleanisVersionAtLeast(String version, String requiredVersion) Compares two version strings to determine if the current version is equal to or newer than the required version.voidload()Loads all integrations for the Graves plugin.private voidLoads the LuckPerms integration if enabled in the configuration.private voidLoads the ChestSort integration if enabled in the configuration.private voidLoads the CitizensNPC integration if enabled in the configuration.private voidLoads and displays warnings for compatibility issues with other plugins.private voidDeprecated.Unmaintained greedware plugin.private voidLoads the FancyNpcs integration if enabled in the configuration.private voidDeprecated.Plugin no longer exists externally Loads the FurnitureEngine integration if enabled in the configuration.private voidLoads the FurnitureLib integration if enabled in the configuration.private voidLoads the ItemBridge integration if enabled in the configuration.private voidLoads the ItemsAdder integration if enabled in the configuration.private voidLoads the LuckPerms integration if enabled in the configuration.private voidLoads the MineDown integration if enabled in the configuration.private voidLoads the MiniMessage integration if enabled in the configuration.private voidLoads the MultiPaper integration if enabled in the configuration.private voidPrints in console if NBTAPI is loaded to let the user know that NBT API will handle inventory storage.private voidloadNexo()Loads the Nexo integration if enabled in the configuration.voidLoads Skript integration without reloading other integrations.private voidprivate voidDeprecated.Use Nexo instead.private voidLoads the PlaceholderAPI integration if enabled in the configuration.private voidLoads the PlayerNPC integration if enabled in the configuration.private voidLoads the ProtectionLib integration if enabled in the configuration.private voidLoads the ProtocolLib integration if enabled in the configuration.private voidLoads the Skript integration if enabled in the configuration.private voidLoads the Vault integration if enabled in the configuration.private voidLoads the WorldEdit integration if enabled in the configuration.private static intparseVersionPart(String part) Parses a single version part to an integer.voidreload()Reloads all integrations by first unloading them and then loading them again.private voidResets the Vault integration by setting the vault and permissions to null.private voidsimilarPluginWarning(String string) Displays a warning message if a plugin with similar functionality to Graves is detected.voidunload()Unloads all integrations associated with the Graves plugin.voidUnloads Skript integration without unloading other integrations.
-
Field Details
-
plugin
The main plugin instance associated with Graves.This
Gravesinstance represents the core plugin that this Graves is part of. It provides access to the plugin's functionality, configuration, and other services. -
multiPaper
Integration with MultiPaper, a server software or library.This
MultiPaperinstance represents the integration with the MultiPaper server software or library. -
vault
Integration with Vault, a permissions and economy API.This
Vaultinstance represents the integration with the Vault API, used for permissions and economy functionalities. -
protocolLib
Integration with ProtocolLib, a library for handling protocol-related tasks.This
ProtocolLibinstance represents the integration with the ProtocolLib library, which is used for manipulating network protocols. -
worldEdit
Integration with WorldEdit, a tool for editing worlds.This
WorldEditinstance represents the integration with the WorldEdit plugin, used for large-scale world editing. -
furnitureLib
Integration with FurnitureLib, a plugin for furniture management.This
FurnitureLibinstance represents the integration with the FurnitureLib plugin, used for managing furniture. -
furnitureEngine
Deprecated.Plugin no longer exists externally Integration with FurnitureEngine, another plugin for furniture management.This
FurnitureEngineinstance represents the integration with the FurnitureEngine plugin, used for managing furniture. -
protectionLib
Integration with ProtectionLib, a library for protection management.This
ProtectionLibinstance represents the integration with the ProtectionLib library, used for protection-related functionalities. -
itemsAdder
Integration with ItemsAdder, a plugin for adding custom items.This
ItemsAdderinstance represents the integration with the ItemsAdder plugin, used for adding custom items to the game. -
oraxen
Integration with Oraxen, a plugin for custom items and resource packs.This
Oraxeninstance represents the integration with the Oraxen plugin, used for managing custom items and resource packs. -
nexo
Integration with Nexo, a plugin for custom items and resource packs.This
Nexoinstance represents the integration with the Nexo plugin, used for managing custom items and resource packs. -
chestSort
Integration with ChestSort, a plugin for sorting chests and inventories.This
ChestSortinstance represents the integration with the ChestSort plugin, used for sorting chests and other inventories. -
miniMessage
Integration with MiniMessage, a library for advanced message formatting.This
MiniMessageinstance represents the integration with the MiniMessage library, used for advanced message formatting. -
mineDown
Integration with MineDown, a library for Markdown-like text formatting.This
MineDowninstance represents the integration with the MineDown library, used for text formatting similar to Markdown. -
itemBridge
Integration with ItemBridge, a plugin or library for item management.This
ItemBridgeinstance represents the integration with the ItemBridge plugin or library, used for managing items. -
floodgate
Integration with floodgateThis boolean is used to handle bedrock players
-
fancyNpcs
Integration with FancyNPCs, a plugin for managing player-like NPCs.This
FancyNPCsinstance represents the integration with the FancyNPCs plugin, used for creating and managing NPCs that mimic players. -
playerNPC
Integration with PlayerNPC, a plugin for managing player-like NPCs.This
PlayerNPCinstance represents the integration with the PlayerNPC plugin, used for creating and managing NPCs that mimic players. -
citizensNPC
Integration with CitizensNPC, a plugin for creating NPCs.This
CitizensNPCinstance represents the integration with the Citizens plugin, used for creating and managing NPCs in the game. -
placeholderAPI
Integration with PlaceholderAPI, a plugin for managing placeholders.This
PlaceholderAPIinstance represents the integration with the PlaceholderAPI plugin, used for managing and resolving placeholders. -
skriptImpl
Integration with Skript, a plugin for scripting.This
SkriptImplinstance represents the integration with the Skript plugin, used for scripting and creating custom scripts. -
hasVaultPermissions
private boolean hasVaultPermissionsIndicates whether Vault permissions are available.This
booleanflag indicates if Vault permissions are present and can be used within the plugin. -
luckPermsHandler
Handles integration with LuckPerms, a permissions management plugin.This
LuckPermsHandlerinstance represents the handler for integrating with the LuckPerms plugin, which manages permissions. -
coreProtectIntegration
Deprecated.Unmaintained greedware plugin. Manages integration with CoreProtect, a plugin for block logging and protection.This
CoreProtectIntegrationinstance represents the integration with the CoreProtect plugin, used for logging and block protection. -
hasVaultEconomy
private boolean hasVaultEconomyIndicates whether Vault Economy are available.This
booleanflag indicates if Vault permissions are present and can be used within the plugin. -
noteBlockAPI
Handles integration with NoteBlockAPI, a permissions management plugin.This
NoteBlockAPIinstance represents the handler for integrating with the NoteBlockAPI plugin, which manages playing nbs files.
-
-
Constructor Details
-
IntegrationManager
Initializes a new instance of theIntegrationManagerclass.- Parameters:
plugin- The plugin instance of Graves.
-
-
Method Details
-
reload
public void reload()Reloads all integrations by first unloading them and then loading them again. -
load
public void load()Loads all integrations for the Graves plugin. -
loadNoReload
public void loadNoReload()Loads Skript integration without reloading other integrations. -
unloadNoReload
public void unloadNoReload()Unloads Skript integration without unloading other integrations. -
unload
public void unload()Unloads all integrations associated with the Graves plugin. -
getMultiPaper
Returns the instance of the MultiPaper integration, if it is loaded.- Returns:
- The
MultiPaperintegration instance, or null if not loaded.
-
getVault
Returns the instance of the Vault integration, if it is loaded.- Returns:
- The
Vaultintegration instance, or null if not loaded.
-
getProtocolLib
Returns the instance of the ProtocolLib integration, if it is loaded.- Returns:
- The
ProtocolLibintegration instance, or null if not loaded.
-
getWorldEdit
Returns the instance of the WorldEdit integration, if it is loaded.- Returns:
- The
WorldEditintegration instance, or null if not loaded.
-
getCoreProtect
Deprecated.Unmaintained greedware plugin. Returns the instance of the CoreProtect integration, if it is loaded.- Returns:
- The
CoreProtectintegration instance, or null if not loaded.
-
getFurnitureLib
Returns the instance of the FurnitureLib integration, if it is loaded.- Returns:
- The
FurnitureLibintegration instance, or null if not loaded.
-
getFurnitureEngine
Deprecated.Plugin no longer exists externally Returns the instance of the FurnitureEngine integration, if it is loaded.- Returns:
- The
FurnitureEngineintegration instance, or null if not loaded.
-
getProtectionLib
Returns the instance of the ProtectionLib integration, if it is loaded.- Returns:
- The
ProtectionLibintegration instance, or null if not loaded.
-
getItemsAdder
Returns the instance of the ItemsAdder integration, if it is loaded.- Returns:
- The
ItemsAdderintegration instance, or null if not loaded.
-
getOraxen
Deprecated.Use Nexo instead. Unmaintained and will be for the forseeable future. Returns the instance of the Oraxen integration, if it is loaded.- Returns:
- The
Oraxenintegration instance, or null if not loaded.
-
getNexo
Returns the instance of the Nexo integration, if it is loaded.- Returns:
- The
Nexointegration instance, or null if not loaded.
-
getMiniMessage
Returns the instance of the MiniMessage integration, if it is loaded.- Returns:
- The
MiniMessageintegration instance, or null if not loaded.
-
getMineDown
Returns the instance of the MineDown integration, if it is loaded.- Returns:
- The
MineDownintegration instance, or null if not loaded.
-
getChestSort
Returns the instance of the ChestSort integration, if it is loaded.- Returns:
- The
ChestSortintegration instance, or null if not loaded.
-
getPlayerNPC
Returns the instance of the PlayerNPC integration, if it is loaded.- Returns:
- The
PlayerNPCintegration instance, or null if not loaded.
-
getNoteBlockAPI
Returns the instance of the NoteBlockAPI integration, if it is loaded.- Returns:
- The
NoteBlockAPIintegration instance, or null if not loaded.
-
getSkript
public ch.njol.skript.SkriptAddon getSkript()Returns the SkriptAddon instance if Skript integration is loaded.- Returns:
- The
SkriptAddoninstance, or null if Skript is not loaded.
-
hasFloodgate
public boolean hasFloodgate()Returns whether you are using floodgate.- Returns:
- The boolean value of floodgate.
-
getFloodgate
Returns the instance of Floodgate integration, if it is loaded.- Returns:
- The
Floodgateintegration instance, or null if not loaded.
-
getFancyNpcs
Returns the instance of the FancyNPCs integration, if it is loaded.- Returns:
- The
FancyNPCsintegration instance, or null if not loaded.
-
getCitizensNPC
Returns the instance of the CitizensNPC integration, if it is loaded.- Returns:
- The
CitizensNPCintegration instance, or null if not loaded.
-
getLuckPermsHandler
Returns the instance of the LuckPermsHandler, if it is loaded.- Returns:
- The
LuckPermsHandlerinstance, or null if not loaded.
-
hasMultiPaper
public boolean hasMultiPaper()Checks if MultiPaper integration is loaded.- Returns:
trueif MultiPaper integration is loaded,falseotherwise.
-
hasVault
public boolean hasVault()Checks if Vault integration is loaded.- Returns:
trueif Vault integration is loaded,falseotherwise.
-
hasVaultPermProvider
public boolean hasVaultPermProvider()Checks if Vault permissions provider is available.- Returns:
trueif Vault permissions provider is available,falseotherwise.
-
hasProtocolLib
public boolean hasProtocolLib()Checks if ProtocolLib integration is loaded.- Returns:
trueif ProtocolLib integration is loaded,falseotherwise.
-
hasCoreProtect
Deprecated.Unmaintained greedware plugin. Checks if CoreProtect integration is loaded.- Returns:
trueif CoreProtect integration is loaded,falseotherwise.
-
hasWorldEdit
public boolean hasWorldEdit()Checks if WorldEdit integration is loaded.- Returns:
trueif WorldEdit integration is loaded,falseotherwise.
-
hasFurnitureLib
public boolean hasFurnitureLib()Checks if FurnitureLib integration is loaded.- Returns:
trueif FurnitureLib integration is loaded,falseotherwise.
-
hasFurnitureEngine
public boolean hasFurnitureEngine()Deprecated.Plugin no longer exists externally Checks if FurnitureEngine integration is loaded.- Returns:
trueif FurnitureEngine integration is loaded,falseotherwise.
-
hasProtectionLib
public boolean hasProtectionLib()Checks if ProtectionLib integration is loaded.- Returns:
trueif ProtectionLib integration is loaded,falseotherwise.
-
hasItemsAdder
public boolean hasItemsAdder()Checks if ItemsAdder integration is loaded.- Returns:
trueif ItemsAdder integration is loaded,falseotherwise.
-
hasOraxen
Deprecated.Use Nexo instead. Unmaintained and will be for the forseeable future. Checks if Oraxen integration is loaded.- Returns:
trueif Oraxen integration is loaded,falseotherwise.
-
hasNexo
public boolean hasNexo()Checks if Nexo integration is loaded.- Returns:
trueif Nexo integration is loaded,falseotherwise.
-
hasMiniMessage
public boolean hasMiniMessage()Checks if MiniMessage integration is loaded.- Returns:
trueif MiniMessage integration is loaded,falseotherwise.
-
hasMineDown
public boolean hasMineDown()Checks if MineDown integration is loaded.- Returns:
trueif MineDown integration is loaded,falseotherwise.
-
hasChestSort
public boolean hasChestSort()Checks if ChestSort integration is loaded.- Returns:
trueif ChestSort integration is loaded,falseotherwise.
-
hasPlayerNPC
public boolean hasPlayerNPC()Checks if PlayerNPC integration is loaded.- Returns:
trueif PlayerNPC integration is loaded,falseotherwise.
-
hasVaultEconomy
public boolean hasVaultEconomy() -
hasCitizensNPC
public boolean hasCitizensNPC()Checks if CitizensNPC integration is loaded.- Returns:
trueif CitizensNPC integration is loaded,falseotherwise.
-
hasPlaceholderAPI
public boolean hasPlaceholderAPI()Checks if PlaceholderAPI integration is loaded.- Returns:
trueif PlaceholderAPI integration is loaded,falseotherwise.
-
hasSkript
public boolean hasSkript()Checks if Skript integration is loaded.- Returns:
trueif Skript integration is loaded,falseotherwise.
-
hasLuckPermsHandler
public boolean hasLuckPermsHandler()Checks if LuckPermsHandler is loaded.- Returns:
trueif LuckPermsHandler is loaded,falseotherwise.
-
hasFancyNpcs
public boolean hasFancyNpcs()Checks if FancyNpcs is loaded.- Returns:
trueif FancyNpcs is loaded,falseotherwise.
-
hasNoteBlockAPI
public boolean hasNoteBlockAPI()Checks if NoteBlockAPI is loaded.- Returns:
trueif NoteBlockAPI is loaded,falseotherwise.
-
loadMultiPaper
private void loadMultiPaper()Loads the MultiPaper integration if enabled in the configuration. -
loadVault
private void loadVault()Loads the Vault integration if enabled in the configuration. -
handleVaultIntegration
private void handleVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin) Handles the integration of the Vault plugin.- Parameters:
vaultPlugin- The Vault plugin instance.
-
enableFullVaultIntegration
private void enableFullVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.economy.Economy> economyProvider, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.permission.Permission> permissionProvider) Enables full Vault integration with both economy and permissions.- Parameters:
vaultPlugin- The Vault plugin instance.economyProvider- The economy service provider.permissionProvider- The permissions service provider.
-
enableEconomyOnlyVaultIntegration
private void enableEconomyOnlyVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.economy.Economy> economyProvider) Enables Vault integration with only economy support.- Parameters:
vaultPlugin- The Vault plugin instance.economyProvider- The economy service provider.
-
enablePermissionsOnlyVaultIntegration
private void enablePermissionsOnlyVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin, org.bukkit.plugin.RegisteredServiceProvider<net.milkbowl.vault.permission.Permission> permissionProvider) Enables Vault integration with only permissions support.- Parameters:
vaultPlugin- The Vault plugin instance.permissionProvider- The permissions service provider.
-
disableVaultIntegration
private void disableVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin) Disables the Vault integration if both economy and permissions are unavailable.- Parameters:
vaultPlugin- The Vault plugin instance.
-
resetVaultIntegration
private void resetVaultIntegration()Resets the Vault integration by setting the vault and permissions to null. -
loadProtocolLib
private void loadProtocolLib()Loads the ProtocolLib integration if enabled in the configuration. -
loadWorldEdit
private void loadWorldEdit()Loads the WorldEdit integration if enabled in the configuration. -
loadCoreProtect
Deprecated.Unmaintained greedware plugin. Loads CoreProtect integration if enabled in the configuration and CoreProtect is installed. -
loadFurnitureLib
private void loadFurnitureLib()Loads the FurnitureLib integration if enabled in the configuration. -
loadFurnitureEngine
private void loadFurnitureEngine()Deprecated.Plugin no longer exists externally Loads the FurnitureEngine integration if enabled in the configuration. -
loadProtectionLib
private void loadProtectionLib()Loads the ProtectionLib integration if enabled in the configuration. -
loadItemsAdder
private void loadItemsAdder()Loads the ItemsAdder integration if enabled in the configuration. -
loadOraxen
Deprecated.Use Nexo instead. Unmaintained and will be for the forseeable future. Loads the Oraxen integration if enabled in the configuration. -
loadNexo
private void loadNexo()Loads the Nexo integration if enabled in the configuration. -
loadMiniMessage
private void loadMiniMessage()Loads the MiniMessage integration if enabled in the configuration. -
loadMineDown
private void loadMineDown()Loads the MineDown integration if enabled in the configuration. -
loadChestSort
private void loadChestSort()Loads the ChestSort integration if enabled in the configuration. -
loadPlayerNPC
private void loadPlayerNPC()Loads the PlayerNPC integration if enabled in the configuration. -
loadFancyNpcs
private void loadFancyNpcs()Loads the FancyNpcs integration if enabled in the configuration. -
loadCitizensNPC
private void loadCitizensNPC()Loads the CitizensNPC integration if enabled in the configuration. -
loadItemBridge
private void loadItemBridge()Loads the ItemBridge integration if enabled in the configuration. -
loadPlaceholderAPI
private void loadPlaceholderAPI()Loads the PlaceholderAPI integration if enabled in the configuration. -
loadSkript
private void loadSkript()Loads the Skript integration if enabled in the configuration. -
loadLuckPerms
private void loadLuckPerms()Loads the LuckPerms integration if enabled in the configuration. -
loadBedrockSupport
private void loadBedrockSupport()Loads the LuckPerms integration if enabled in the configuration. -
loadNBTAPI
private void loadNBTAPI()Prints in console if NBTAPI is loaded to let the user know that NBT API will handle inventory storage. -
loadNoteblockAPI
private void loadNoteblockAPI() -
loadCompatibilityWarnings
private void loadCompatibilityWarnings()Loads and displays warnings for compatibility issues with other plugins. -
isPaperLikeServer
private boolean isPaperLikeServer()Checks if server is running Paper or Paper related forks. -
checkForPluginManagers
public void checkForPluginManagers()Checks for known plugin managers that could cause compatibility issues. -
similarPluginWarning
Displays a warning message if a plugin with similar functionality to Graves is detected.- Parameters:
string- The name of the plugin to check for.
-
isVersionAtLeast
Compares two version strings to determine if the current version is equal to or newer than the required version.Handles version strings with non-numeric prefixes and suffixes (e.g., "v1.5.0-SNAPSHOT", "version-2.0-beta"). Only numeric dot-separated parts are compared (e.g., "1.5.0"). Missing parts are treated as zero (e.g., "1.5" == "1.5.0"). Returns true if versions are equal or
versionis greater thanrequiredVersion.- Parameters:
version- the current version string (may contain prefix/suffix text)requiredVersion- the minimum version required (clean or with text)- Returns:
- true if
versionis greater than or equal torequiredVersion, false otherwise
-
extractNumericVersion
Extracts the numeric version string from a full string (e.g., "v1.5.2-beta" → "1.5.2"). Looks for the first digit and captures following dot-separated numeric components.- Parameters:
input- the full version string- Returns:
- a sanitized version string with only digits and dots
-
parseVersionPart
Parses a single version part to an integer. Non-digit characters are ignored.- Parameters:
part- a single segment of a version string (e.g., "1", "2-SNAPSHOT")- Returns:
- the numeric value, or 0 if invalid
-