Class SpigotApplicationBuilder
The SpigotApplicationBuilder provides methods for customizing the behavior of the
application, such as enabling debug mode, configuring dependency remapping, and injecting
dependencies into the application. This builder is specifically designed to work in the context
of a Spigot plugin environment, utilizing plugin-specific resources such as the logger, class
loader, and data folder.
The builder ensures that dependencies are properly loaded and optionally remapped, enabling advanced use cases like dependency isolation or custom dependency management for Spigot plugins.
This class is immutable and can only be configured through fluent methods. Once configuration
is complete, calling ApplicationBuilder.build() will create and return the configured application
instance.
-
Field Summary
Fields inherited from class io.github.slimjar.app.builder.ApplicationBuilder
self -
Constructor Summary
ConstructorsConstructorDescriptionSpigotApplicationBuilder(@NotNull org.bukkit.plugin.Plugin plugin) Constructs a new instance ofSpigotApplicationBuilderfor building a Spigot-based application. -
Method Summary
Methods inherited from class io.github.slimjar.app.builder.ApplicationBuilder
appending, build, createInjector, dataProviderFactory, dependencyFileUrl, downloadDirectoryPath, downloaderFactory, enquirerFactory, getApplicationName, getDataProviderFactory, getDependencyFileUrl, getDownloadDirectoryPath, getDownloaderFactory, getEnquirerFactory, getInjectorFactory, getLogger, getMirrorSelector, getPreResolutionDataProviderFactory, getPreResolutionFileUrl, getRelocationHelperFactory, getRelocatorFactory, getResolverFactory, getVerifierFactory, injecting, injectorFactory, isolated, logger, mirrorSelector, preResolutionDataProviderFactory, preResolutionFileUrl, relocationHelperFactory, relocatorFactory, resolverFactory, verifierFactory
-
Constructor Details
-
SpigotApplicationBuilder
public SpigotApplicationBuilder(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) Constructs a new instance ofSpigotApplicationBuilderfor building a Spigot-based application. This constructor initializes the application builder with plugin-specific configurations such as the name, class loader, logger, and download directory for dependency management.- Parameters:
plugin- an instance ofPluginrepresenting the Spigot plugin. This plugin provides the necessary context, such as its name, logger, class loader, and data folder, for configuring the application builder.
-
-
Method Details
-
debug
Sets the debug mode for the application builder. Ignored when a custom process logger is used- Parameters:
debug- a boolean indicating whether debug logging should be enabled (true) or disabled (false)- Returns:
- the current instance of
SpigotApplicationBuilderfor method chaining
-
remap
Sets the remap mode for the application builder.- Parameters:
remap- a boolean indicating whether remapping should be enabled (true) or disabled (false)- Returns:
- the current instance of
SpigotApplicationBuilderfor method chaining
-
buildApplication
@NotNull protected @NotNull io.github.slimjar.app.Application buildApplication()- Specified by:
buildApplicationin classio.github.slimjar.app.builder.ApplicationBuilder<SpigotApplicationBuilder>
-