Package ovh.mythmc.gestalt.loader
Class BukkitGestaltLoader
java.lang.Object
ovh.mythmc.gestalt.loader.GestaltLoader
ovh.mythmc.gestalt.loader.BukkitGestaltLoader
A
GestaltLoader implementation for the Bukkit/Spigot platform.
Loads the Gestalt JAR via Bukkit.getPluginManager().loadPlugin() and reports
availability via Bukkit.getPluginManager().isPluginEnabled("gestalt").
Use builder() to construct an instance:
BukkitGestaltLoader loader = BukkitGestaltLoader.builder()
.initializer(this)
.build();
loader.initialize();
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a newBukkitGestaltLoader.BukkitGestaltLoaderBuilder.Returns the root data directory of the plugin.Returns the logger wrapper used to emit status messages during loading.protected booleanReturns whether Gestalt is already available and loaded on this platform.protected voidload()Performs the platform-specific routine to load the Gestalt JAR into the server.Methods inherited from class ovh.mythmc.gestalt.loader.GestaltLoader
getGestaltPath, getJarPath, initialize, terminate
-
Method Details
-
getDataDirectory
Description copied from class:GestaltLoaderReturns the root data directory of the plugin. The Gestalt JAR will be placed at<dataDirectory>/libs/gestalt.jar.- Specified by:
getDataDirectoryin classGestaltLoader- Returns:
- the plugin data directory
-
getLogger
Description copied from class:GestaltLoaderReturns the logger wrapper used to emit status messages during loading.- Specified by:
getLoggerin classGestaltLoader- Returns:
- the logger wrapper
-
load
protected void load()Description copied from class:GestaltLoaderPerforms the platform-specific routine to load the Gestalt JAR into the server. Called byGestaltLoader.initialize()after the JAR has been verified to exist on disk.- Specified by:
loadin classGestaltLoader
-
isAvailable
protected boolean isAvailable()Description copied from class:GestaltLoaderReturns whether Gestalt is already available and loaded on this platform.If
true,GestaltLoader.initialize()will return early without downloading or loading.- Specified by:
isAvailablein classGestaltLoader- Returns:
trueif Gestalt is already loaded
-
builder
Returns a newBukkitGestaltLoader.BukkitGestaltLoaderBuilder.- Returns:
- a new builder
-