Package dev.hypera.chameleon
Class Chameleon
- java.lang.Object
-
- dev.hypera.chameleon.Chameleon
-
public abstract class Chameleon extends Object
Chameleon.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedChameleon(@NotNull ChameleonPluginBootstrap pluginBootstrap, @NotNull EventBus eventBus, @NotNull ChameleonLogger logger, @NotNull ExtensionMap extensions)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract @NotNull ChameleonAudienceProvidergetAdventure()Returns the audience provider.static @NotNull StringgetBranch()Returns the Git branch Chameleon was built from.static @NotNull InstantgetBuildTime()Returns the time Chameleon was built.abstract @NotNull CommandManagergetCommandManager()Returns the command manager.static @NotNull StringgetCommitHash()Returns the SHA-1 hash of the Git commit Chameleon was built from.abstract @NotNull PathgetDataDirectory()Returns the plugin data directory.@NotNull EventBusgetEventBus()Returns the event bus.@NotNull ExtensionManagergetExtensionManager()Returns the extension manager.@NotNull ChameleonLoggergetInternalLogger()Returns an internal logger instance for use by Chameleon.@NotNull ChameleonLoggergetLogger()Returns the plugin logger.abstract @NotNull PlatformgetPlatform()Returns the platform.@NotNull ChameleonPlugingetPlugin()Returns the plugin.abstract @NotNull PluginManagergetPluginManager()Returns the plugin manager.abstract @NotNull SchedulergetScheduler()Returns the scheduler.static @NotNull StringgetShortCommitHash()Returns the shortened SHA-1 hash of the Git commit Chameleon was built from.abstract @NotNull UserManagergetUserManager()Returns the user manager.static @NotNull StringgetVersion()Returns the current version of Chameleon.voidonDisable()Called when the platform plugin is disabled.voidonEnable()Called when the platform plugin is enabled.voidonLoad()Called after Chameleon has been loaded.
-
-
-
Constructor Detail
-
Chameleon
@Internal protected Chameleon(@NotNull @NotNull ChameleonPluginBootstrap pluginBootstrap, @NotNull @NotNull EventBus eventBus, @NotNull @NotNull ChameleonLogger logger, @NotNull @NotNull ExtensionMap extensions)
-
-
Method Detail
-
onLoad
public void onLoad()
Called after Chameleon has been loaded.
-
onEnable
public void onEnable()
Called when the platform plugin is enabled.
-
onDisable
public void onDisable()
Called when the platform plugin is disabled.
-
getPlugin
@NotNull public final @NotNull ChameleonPlugin getPlugin()
Returns the plugin.- Returns:
- plugin.
-
getLogger
@NotNull public final @NotNull ChameleonLogger getLogger()
Returns the plugin logger.- Returns:
- plugin logger.
-
getInternalLogger
@Internal @NotNull public final @NotNull ChameleonLogger getInternalLogger()
Returns an internal logger instance for use by Chameleon.This must not be used outside of Chameleon and is only intended to be used for debugging and error reporting by Chameleon.
- Returns:
- the internal logger instance.
-
getEventBus
@NotNull public final @NotNull EventBus getEventBus()
Returns the event bus.- Returns:
- event bus.
-
getExtensionManager
@NotNull public final @NotNull ExtensionManager getExtensionManager()
Returns the extension manager.- Returns:
- extension manager.
-
getAdventure
@NotNull public abstract @NotNull ChameleonAudienceProvider getAdventure()
Returns the audience provider.- Returns:
- audience provider.
-
getPlatform
@NotNull public abstract @NotNull Platform getPlatform()
Returns the platform.- Returns:
- platform.
-
getCommandManager
@NotNull public abstract @NotNull CommandManager getCommandManager()
Returns the command manager.- Returns:
- command manager.
-
getPluginManager
@NotNull public abstract @NotNull PluginManager getPluginManager()
Returns the plugin manager.- Returns:
- plugin manager.
-
getUserManager
@NotNull public abstract @NotNull UserManager getUserManager()
Returns the user manager.- Returns:
- user manager.
-
getScheduler
@NotNull public abstract @NotNull Scheduler getScheduler()
Returns the scheduler.- Returns:
- scheduler.
-
getDataDirectory
@NotNull public abstract @NotNull Path getDataDirectory()
Returns the plugin data directory.- Returns:
- plugin data directory.
-
getVersion
@NotNull public static @NotNull String getVersion()
Returns the current version of Chameleon.- Returns:
- current version.
-
getBranch
@NotNull public static @NotNull String getBranch()
Returns the Git branch Chameleon was built from.- Returns:
- branch.
-
getCommitHash
@NotNull public static @NotNull String getCommitHash()
Returns the SHA-1 hash of the Git commit Chameleon was built from.- Returns:
- commit hash.
-
getShortCommitHash
@NotNull public static @NotNull String getShortCommitHash()
Returns the shortened SHA-1 hash of the Git commit Chameleon was built from.- Returns:
- shortened commit hash.
-
getBuildTime
@NotNull public static @NotNull Instant getBuildTime()
Returns the time Chameleon was built.- Returns:
- build time.
-
-