Class IntegrationManager

java.lang.Object
com.ranull.graves.manager.IntegrationManager

public final class IntegrationManager extends Object
The 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

    Fields
    Modifier and Type
    Field
    Description
    private ChestSort
    Integration with ChestSort, a plugin for sorting chests and inventories.
    private CitizensNPC
    Integration with CitizensNPC, a plugin for creating NPCs.
    Manages integration with CoreProtect, a plugin for block logging and protection.
    private FancyNPCs
    Integration with FancyNPCs, a plugin for managing player-like NPCs.
    private Floodgate
    Integration with floodgate
    Deprecated.
    Plugin no longer exists externally Integration with FurnitureEngine, another plugin for furniture management.
    private FurnitureLib
    Integration with FurnitureLib, a plugin for furniture management.
    private boolean
    Indicates whether Vault Economy are available.
    private boolean
    Indicates whether Vault permissions are available.
    private ItemBridge
    Integration with ItemBridge, a plugin or library for item management.
    private ItemsAdder
    Integration with ItemsAdder, a plugin for adding custom items.
    Handles integration with LuckPerms, a permissions management plugin.
    private MineDown
    Integration with MineDown, a library for Markdown-like text formatting.
    private MiniMessage
    Integration with MiniMessage, a library for advanced message formatting.
    private MultiPaper
    Integration with MultiPaper, a server software or library.
    private Nexo
    Integration with Nexo, a plugin for custom items and resource packs.
    private NoteBlockAPI
    Handles integration with NoteBlockAPI, a permissions management plugin.
    private Oraxen
    Integration with Oraxen, a plugin for custom items and resource packs.
    Integration with PlaceholderAPI, a plugin for managing placeholders.
    private PlayerNPC
    Integration with PlayerNPC, a plugin for managing player-like NPCs.
    private final Graves
    The main plugin instance associated with Graves.
    Integration with ProtectionLib, a library for protection management.
    private ProtocolLib
    Integration with ProtocolLib, a library for handling protocol-related tasks.
    private SkriptImpl
    Integration with Skript, a plugin for scripting.
    private Vault
    Integration with Vault, a permissions and economy API.
    private WorldEdit
    Integration with WorldEdit, a tool for editing worlds.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes a new instance of the IntegrationManager class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Checks for known plugin managers that could cause compatibility issues.
    private void
    disableVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin)
    Disables the Vault integration if both economy and permissions are unavailable.
    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.
    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.
    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.
    private static String
    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.
    Returns the instance of the CoreProtect integration, if it is loaded.
    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.
    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.SkriptAddon
    Returns the SkriptAddon instance if Skript integration is loaded.
    Returns the instance of the Vault integration, if it is loaded.
    Returns the instance of the WorldEdit integration, if it is loaded.
    private void
    handleVaultIntegration(org.bukkit.plugin.Plugin vaultPlugin)
    Handles the integration of the Vault plugin.
    boolean
    Checks if ChestSort integration is loaded.
    boolean
    Checks if CitizensNPC integration is loaded.
    boolean
    Checks if CoreProtect integration is loaded.
    boolean
    Checks if FancyNpcs is loaded.
    boolean
    Returns whether you are using floodgate.
    boolean
    Deprecated.
    Plugin no longer exists externally Checks if FurnitureEngine integration is loaded.
    boolean
    Checks if FurnitureLib integration is loaded.
    boolean
    Checks if ItemsAdder integration is loaded.
    boolean
    Checks if LuckPermsHandler is loaded.
    boolean
    Checks if MineDown integration is loaded.
    boolean
    Checks if MiniMessage integration is loaded.
    boolean
    Checks if MultiPaper integration is loaded.
    boolean
    Checks if Nexo integration is loaded.
    boolean
    Checks if NoteBlockAPI is loaded.
    boolean
    Deprecated.
    Use Nexo instead.
    boolean
    Checks if PlaceholderAPI integration is loaded.
    boolean
    Checks if PlayerNPC integration is loaded.
    boolean
    Checks if ProtectionLib integration is loaded.
    boolean
    Checks if ProtocolLib integration is loaded.
    boolean
    Checks if Skript integration is loaded.
    boolean
    Checks if Vault integration is loaded.
    boolean
     
    boolean
    Checks if Vault permissions provider is available.
    boolean
    Checks if WorldEdit integration is loaded.
    private boolean
    Checks if server is running Paper or Paper related forks.
    private static boolean
    isVersionAtLeast(String version, String requiredVersion)
    Compares two version strings to determine if the current version is equal to or newer than the required version.
    void
    Loads all integrations for the Graves plugin.
    private void
    Loads the LuckPerms integration if enabled in the configuration.
    private void
    Loads the ChestSort integration if enabled in the configuration.
    private void
    Loads the CitizensNPC integration if enabled in the configuration.
    private void
    Loads and displays warnings for compatibility issues with other plugins.
    private void
    Loads CoreProtect integration if enabled in the configuration and CoreProtect is installed.
    private void
    Loads the FancyNpcs integration if enabled in the configuration.
    private void
    Deprecated.
    Plugin no longer exists externally Loads the FurnitureEngine integration if enabled in the configuration.
    private void
    Loads the FurnitureLib integration if enabled in the configuration.
    private void
    Loads the ItemBridge integration if enabled in the configuration.
    private void
    Loads the ItemsAdder integration if enabled in the configuration.
    private void
    Loads the LuckPerms integration if enabled in the configuration.
    private void
    Loads the MineDown integration if enabled in the configuration.
    private void
    Loads the MiniMessage integration if enabled in the configuration.
    private void
    Loads the MultiPaper integration if enabled in the configuration.
    private void
    Prints in console if NBTAPI is loaded to let the user know that NBT API will handle inventory storage.
    private void
    Loads the Nexo integration if enabled in the configuration.
    void
    Loads Skript integration without reloading other integrations.
    private void
     
    private void
    Deprecated.
    Use Nexo instead.
    private void
    Loads the PlaceholderAPI integration if enabled in the configuration.
    private void
    Loads the PlayerNPC integration if enabled in the configuration.
    private void
    Loads the ProtectionLib integration if enabled in the configuration.
    private void
    Loads the ProtocolLib integration if enabled in the configuration.
    private void
    Loads the Skript integration if enabled in the configuration.
    private void
    Loads the Vault integration if enabled in the configuration.
    private void
    Loads the WorldEdit integration if enabled in the configuration.
    private static int
    Parses a single version part to an integer.
    void
    Reloads all integrations by first unloading them and then loading them again.
    private void
    Resets the Vault integration by setting the vault and permissions to null.
    private void
    Displays a warning message if a plugin with similar functionality to Graves is detected.
    void
    Unloads all integrations associated with the Graves plugin.
    void
    Unloads Skript integration without unloading other integrations.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • plugin

      private final Graves plugin
      The main plugin instance associated with Graves.

      This Graves instance represents the core plugin that this Graves is part of. It provides access to the plugin's functionality, configuration, and other services.

    • multiPaper

      private MultiPaper multiPaper
      Integration with MultiPaper, a server software or library.

      This MultiPaper instance represents the integration with the MultiPaper server software or library.

    • vault

      private Vault vault
      Integration with Vault, a permissions and economy API.

      This Vault instance represents the integration with the Vault API, used for permissions and economy functionalities.

    • protocolLib

      private ProtocolLib protocolLib
      Integration with ProtocolLib, a library for handling protocol-related tasks.

      This ProtocolLib instance represents the integration with the ProtocolLib library, which is used for manipulating network protocols.

    • worldEdit

      private WorldEdit worldEdit
      Integration with WorldEdit, a tool for editing worlds.

      This WorldEdit instance represents the integration with the WorldEdit plugin, used for large-scale world editing.

    • furnitureLib

      private FurnitureLib furnitureLib
      Integration with FurnitureLib, a plugin for furniture management.

      This FurnitureLib instance represents the integration with the FurnitureLib plugin, used for managing furniture.

    • furnitureEngine

      private FurnitureEngine furnitureEngine
      Deprecated.
      Plugin no longer exists externally Integration with FurnitureEngine, another plugin for furniture management.

      This FurnitureEngine instance represents the integration with the FurnitureEngine plugin, used for managing furniture.

    • protectionLib

      private ProtectionLib protectionLib
      Integration with ProtectionLib, a library for protection management.

      This ProtectionLib instance represents the integration with the ProtectionLib library, used for protection-related functionalities.

    • itemsAdder

      private ItemsAdder itemsAdder
      Integration with ItemsAdder, a plugin for adding custom items.

      This ItemsAdder instance represents the integration with the ItemsAdder plugin, used for adding custom items to the game.

    • oraxen

      private Oraxen oraxen
      Integration with Oraxen, a plugin for custom items and resource packs.

      This Oraxen instance represents the integration with the Oraxen plugin, used for managing custom items and resource packs.

    • nexo

      private Nexo nexo
      Integration with Nexo, a plugin for custom items and resource packs.

      This Nexo instance represents the integration with the Nexo plugin, used for managing custom items and resource packs.

    • chestSort

      private ChestSort chestSort
      Integration with ChestSort, a plugin for sorting chests and inventories.

      This ChestSort instance represents the integration with the ChestSort plugin, used for sorting chests and other inventories.

    • miniMessage

      private MiniMessage miniMessage
      Integration with MiniMessage, a library for advanced message formatting.

      This MiniMessage instance represents the integration with the MiniMessage library, used for advanced message formatting.

    • mineDown

      private MineDown mineDown
      Integration with MineDown, a library for Markdown-like text formatting.

      This MineDown instance represents the integration with the MineDown library, used for text formatting similar to Markdown.

    • itemBridge

      private ItemBridge itemBridge
      Integration with ItemBridge, a plugin or library for item management.

      This ItemBridge instance represents the integration with the ItemBridge plugin or library, used for managing items.

    • floodgate

      private Floodgate floodgate
      Integration with floodgate

      This boolean is used to handle bedrock players

    • fancyNpcs

      private FancyNPCs fancyNpcs
      Integration with FancyNPCs, a plugin for managing player-like NPCs.

      This FancyNPCs instance represents the integration with the FancyNPCs plugin, used for creating and managing NPCs that mimic players.

    • playerNPC

      private PlayerNPC playerNPC
      Integration with PlayerNPC, a plugin for managing player-like NPCs.

      This PlayerNPC instance represents the integration with the PlayerNPC plugin, used for creating and managing NPCs that mimic players.

    • citizensNPC

      private CitizensNPC citizensNPC
      Integration with CitizensNPC, a plugin for creating NPCs.

      This CitizensNPC instance represents the integration with the Citizens plugin, used for creating and managing NPCs in the game.

    • placeholderAPI

      private PlaceholderAPI placeholderAPI
      Integration with PlaceholderAPI, a plugin for managing placeholders.

      This PlaceholderAPI instance represents the integration with the PlaceholderAPI plugin, used for managing and resolving placeholders.

    • skriptImpl

      private SkriptImpl skriptImpl
      Integration with Skript, a plugin for scripting.

      This SkriptImpl instance represents the integration with the Skript plugin, used for scripting and creating custom scripts.

    • hasVaultPermissions

      private boolean hasVaultPermissions
      Indicates whether Vault permissions are available.

      This boolean flag indicates if Vault permissions are present and can be used within the plugin.

    • luckPermsHandler

      private LuckPermsHandler luckPermsHandler
      Handles integration with LuckPerms, a permissions management plugin.

      This LuckPermsHandler instance represents the handler for integrating with the LuckPerms plugin, which manages permissions.

    • coreProtectIntegration

      private CoreProtectIntegration coreProtectIntegration
      Manages integration with CoreProtect, a plugin for block logging and protection.

      This CoreProtectIntegration instance represents the integration with the CoreProtect plugin, used for logging and block protection.

    • hasVaultEconomy

      private boolean hasVaultEconomy
      Indicates whether Vault Economy are available.

      This boolean flag indicates if Vault permissions are present and can be used within the plugin.

    • noteBlockAPI

      private NoteBlockAPI noteBlockAPI
      Handles integration with NoteBlockAPI, a permissions management plugin.

      This NoteBlockAPI instance represents the handler for integrating with the NoteBlockAPI plugin, which manages playing nbs files.

  • Constructor Details

    • IntegrationManager

      public IntegrationManager(Graves plugin)
      Initializes a new instance of the IntegrationManager class.
      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

      public MultiPaper getMultiPaper()
      Returns the instance of the MultiPaper integration, if it is loaded.
      Returns:
      The MultiPaper integration instance, or null if not loaded.
    • getVault

      public Vault getVault()
      Returns the instance of the Vault integration, if it is loaded.
      Returns:
      The Vault integration instance, or null if not loaded.
    • getProtocolLib

      public ProtocolLib getProtocolLib()
      Returns the instance of the ProtocolLib integration, if it is loaded.
      Returns:
      The ProtocolLib integration instance, or null if not loaded.
    • getWorldEdit

      public WorldEdit getWorldEdit()
      Returns the instance of the WorldEdit integration, if it is loaded.
      Returns:
      The WorldEdit integration instance, or null if not loaded.
    • getCoreProtect

      public CoreProtectIntegration getCoreProtect()
      Returns the instance of the CoreProtect integration, if it is loaded.
      Returns:
      The CoreProtect integration instance, or null if not loaded.
    • getFurnitureLib

      public FurnitureLib getFurnitureLib()
      Returns the instance of the FurnitureLib integration, if it is loaded.
      Returns:
      The FurnitureLib integration instance, or null if not loaded.
    • getFurnitureEngine

      public FurnitureEngine getFurnitureEngine()
      Deprecated.
      Plugin no longer exists externally Returns the instance of the FurnitureEngine integration, if it is loaded.
      Returns:
      The FurnitureEngine integration instance, or null if not loaded.
    • getProtectionLib

      public ProtectionLib getProtectionLib()
      Returns the instance of the ProtectionLib integration, if it is loaded.
      Returns:
      The ProtectionLib integration instance, or null if not loaded.
    • getItemsAdder

      public ItemsAdder getItemsAdder()
      Returns the instance of the ItemsAdder integration, if it is loaded.
      Returns:
      The ItemsAdder integration instance, or null if not loaded.
    • getOraxen

      @Deprecated public Oraxen 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 Oraxen integration instance, or null if not loaded.
    • getNexo

      public Nexo getNexo()
      Returns the instance of the Nexo integration, if it is loaded.
      Returns:
      The Nexo integration instance, or null if not loaded.
    • getMiniMessage

      public MiniMessage getMiniMessage()
      Returns the instance of the MiniMessage integration, if it is loaded.
      Returns:
      The MiniMessage integration instance, or null if not loaded.
    • getMineDown

      public MineDown getMineDown()
      Returns the instance of the MineDown integration, if it is loaded.
      Returns:
      The MineDown integration instance, or null if not loaded.
    • getChestSort

      public ChestSort getChestSort()
      Returns the instance of the ChestSort integration, if it is loaded.
      Returns:
      The ChestSort integration instance, or null if not loaded.
    • getPlayerNPC

      public PlayerNPC getPlayerNPC()
      Returns the instance of the PlayerNPC integration, if it is loaded.
      Returns:
      The PlayerNPC integration instance, or null if not loaded.
    • getNoteBlockAPI

      public NoteBlockAPI getNoteBlockAPI()
      Returns the instance of the NoteBlockAPI integration, if it is loaded.
      Returns:
      The NoteBlockAPI integration instance, or null if not loaded.
    • getSkript

      public ch.njol.skript.SkriptAddon getSkript()
      Returns the SkriptAddon instance if Skript integration is loaded.
      Returns:
      The SkriptAddon instance, or null if Skript is not loaded.
    • hasFloodgate

      public boolean hasFloodgate()
      Returns whether you are using floodgate.
      Returns:
      The boolean value of floodgate.
    • getFloodgate

      public Floodgate getFloodgate()
      Returns the instance of Floodgate integration, if it is loaded.
      Returns:
      The Floodgate integration instance, or null if not loaded.
    • getFancyNpcs

      public FancyNPCs getFancyNpcs()
      Returns the instance of the FancyNPCs integration, if it is loaded.
      Returns:
      The FancyNPCs integration instance, or null if not loaded.
    • getCitizensNPC

      public CitizensNPC getCitizensNPC()
      Returns the instance of the CitizensNPC integration, if it is loaded.
      Returns:
      The CitizensNPC integration instance, or null if not loaded.
    • getLuckPermsHandler

      public LuckPermsHandler getLuckPermsHandler()
      Returns the instance of the LuckPermsHandler, if it is loaded.
      Returns:
      The LuckPermsHandler instance, or null if not loaded.
    • hasMultiPaper

      public boolean hasMultiPaper()
      Checks if MultiPaper integration is loaded.
      Returns:
      true if MultiPaper integration is loaded, false otherwise.
    • hasVault

      public boolean hasVault()
      Checks if Vault integration is loaded.
      Returns:
      true if Vault integration is loaded, false otherwise.
    • hasVaultPermProvider

      public boolean hasVaultPermProvider()
      Checks if Vault permissions provider is available.
      Returns:
      true if Vault permissions provider is available, false otherwise.
    • hasProtocolLib

      public boolean hasProtocolLib()
      Checks if ProtocolLib integration is loaded.
      Returns:
      true if ProtocolLib integration is loaded, false otherwise.
    • hasCoreProtect

      public boolean hasCoreProtect()
      Checks if CoreProtect integration is loaded.
      Returns:
      true if CoreProtect integration is loaded, false otherwise.
    • hasWorldEdit

      public boolean hasWorldEdit()
      Checks if WorldEdit integration is loaded.
      Returns:
      true if WorldEdit integration is loaded, false otherwise.
    • hasFurnitureLib

      public boolean hasFurnitureLib()
      Checks if FurnitureLib integration is loaded.
      Returns:
      true if FurnitureLib integration is loaded, false otherwise.
    • hasFurnitureEngine

      public boolean hasFurnitureEngine()
      Deprecated.
      Plugin no longer exists externally Checks if FurnitureEngine integration is loaded.
      Returns:
      true if FurnitureEngine integration is loaded, false otherwise.
    • hasProtectionLib

      public boolean hasProtectionLib()
      Checks if ProtectionLib integration is loaded.
      Returns:
      true if ProtectionLib integration is loaded, false otherwise.
    • hasItemsAdder

      public boolean hasItemsAdder()
      Checks if ItemsAdder integration is loaded.
      Returns:
      true if ItemsAdder integration is loaded, false otherwise.
    • hasOraxen

      @Deprecated public boolean hasOraxen()
      Deprecated.
      Use Nexo instead. Unmaintained and will be for the forseeable future. Checks if Oraxen integration is loaded.
      Returns:
      true if Oraxen integration is loaded, false otherwise.
    • hasNexo

      public boolean hasNexo()
      Checks if Nexo integration is loaded.
      Returns:
      true if Nexo integration is loaded, false otherwise.
    • hasMiniMessage

      public boolean hasMiniMessage()
      Checks if MiniMessage integration is loaded.
      Returns:
      true if MiniMessage integration is loaded, false otherwise.
    • hasMineDown

      public boolean hasMineDown()
      Checks if MineDown integration is loaded.
      Returns:
      true if MineDown integration is loaded, false otherwise.
    • hasChestSort

      public boolean hasChestSort()
      Checks if ChestSort integration is loaded.
      Returns:
      true if ChestSort integration is loaded, false otherwise.
    • hasPlayerNPC

      public boolean hasPlayerNPC()
      Checks if PlayerNPC integration is loaded.
      Returns:
      true if PlayerNPC integration is loaded, false otherwise.
    • hasVaultEconomy

      public boolean hasVaultEconomy()
    • hasCitizensNPC

      public boolean hasCitizensNPC()
      Checks if CitizensNPC integration is loaded.
      Returns:
      true if CitizensNPC integration is loaded, false otherwise.
    • hasPlaceholderAPI

      public boolean hasPlaceholderAPI()
      Checks if PlaceholderAPI integration is loaded.
      Returns:
      true if PlaceholderAPI integration is loaded, false otherwise.
    • hasSkript

      public boolean hasSkript()
      Checks if Skript integration is loaded.
      Returns:
      true if Skript integration is loaded, false otherwise.
    • hasLuckPermsHandler

      public boolean hasLuckPermsHandler()
      Checks if LuckPermsHandler is loaded.
      Returns:
      true if LuckPermsHandler is loaded, false otherwise.
    • hasFancyNpcs

      public boolean hasFancyNpcs()
      Checks if FancyNpcs is loaded.
      Returns:
      true if FancyNpcs is loaded, false otherwise.
    • hasNoteBlockAPI

      public boolean hasNoteBlockAPI()
      Checks if NoteBlockAPI is loaded.
      Returns:
      true if NoteBlockAPI is loaded, false otherwise.
    • 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

      private void loadCoreProtect()
      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 private void 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

      private void similarPluginWarning(String string)
      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

      private static boolean isVersionAtLeast(String version, String requiredVersion)
      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 version is greater than requiredVersion.

      Parameters:
      version - the current version string (may contain prefix/suffix text)
      requiredVersion - the minimum version required (clean or with text)
      Returns:
      true if version is greater than or equal to requiredVersion, false otherwise
    • extractNumericVersion

      private static String extractNumericVersion(String input)
      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

      private static int parseVersionPart(String part)
      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