PluginBase

abstract class PluginBase implements CommandOwner

The abstract base class for all plugins and modules. Provides common functionality for plugin lifecycle management (setup, start, shutdown), access to registries for events, commands, components, and configuration management.

java.lang.Object > PluginBase

Field Summary

state

private PluginState state

Field state.

pluginManifest

final PluginManifest pluginManifest

Field pluginManifest.

pluginName

final String pluginName

Field pluginName.

isPlugin

final boolean isPlugin

Field isPlugin.

config

final Config config

Field config.

futures

final CompletableFuture[] futures

Field futures.

registry

final IRegistry registry

Field registry.

b

final boolean b

Field b.

Method Detail

PluginBase

public public PluginBase (@Nonnull final PluginInit init)

Method PluginBase.

Parameters:
@Nonnull final PluginInit init

ClientFeatureRegistry

public new ClientFeatureRegistry (this.shutdownTasks, ()

Method ClientFeatureRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
( (

CommandRegistry

public new CommandRegistry (this.shutdownTasks, ()

Method CommandRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
( (

EventRegistry

public new EventRegistry (this.shutdownTasks, ()

Method EventRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
( (

BlockStateRegistry

public new BlockStateRegistry (this.shutdownTasks, ()

Method BlockStateRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
( (

EntityRegistry

public new EntityRegistry (this.shutdownTasks, ()

Method EntityRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
( (

TaskRegistry

public new TaskRegistry (this.shutdownTasks, ()

Method TaskRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
( (

withConfig

final Config withConfig (@Nonnull final BuilderCodec configCodec)

Method withConfig.

Parameters:
@Nonnull final BuilderCodec configCodec

preLoad

public CompletableFuture preLoad ()

Method preLoad.

getName

public String getName ()

Method getName.

getLogger

public HytaleLogger getLogger ()

Method getLogger.

getIdentifier

public PluginIdentifier getIdentifier ()

Method getIdentifier.

getManifest

public PluginManifest getManifest ()

Method getManifest.

getDataDirectory

public Path getDataDirectory ()

Method getDataDirectory.

getState

public PluginState getState ()

Method getState.

getClientFeatureRegistry

public ClientFeatureRegistry getClientFeatureRegistry ()

Method getClientFeatureRegistry.

getCommandRegistry

public CommandRegistry getCommandRegistry ()

Method getCommandRegistry.

getEventRegistry

public EventRegistry getEventRegistry ()

Method getEventRegistry.

getBlockStateRegistry

public BlockStateRegistry getBlockStateRegistry ()

Method getBlockStateRegistry.

getEntityRegistry

public EntityRegistry getEntityRegistry ()

Method getEntityRegistry.

getTaskRegistry

public TaskRegistry getTaskRegistry ()

Method getTaskRegistry.

getEntityStoreRegistry

public ComponentRegistryProxy getEntityStoreRegistry ()

Method getEntityStoreRegistry.

getChunkStoreRegistry

public ComponentRegistryProxy getChunkStoreRegistry ()

Method getChunkStoreRegistry.

getAssetRegistry

public AssetRegistry getAssetRegistry ()

Method getAssetRegistry.

getCodecRegistry

public C> getCodecRegistry (@Nonnull final StringCodecMapCodec mapCodec)

Method getCodecRegistry.

Parameters:
@Nonnull final StringCodecMapCodec mapCodec

CodecMapRegistry

public new CodecMapRegistry (this.shutdownTasks, mapCodec)

Method CodecMapRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
mapCodec mapCodec

MapKeyMapRegistry

public new MapKeyMapRegistry (this.shutdownTasks, mapCodec)

Method MapKeyMapRegistry.

Parameters:
this.shutdownTasks this.shutdownTasks
mapCodec mapCodec

getBasePermission

final String getBasePermission ()

Method getBasePermission.

isDisabled

public boolean isDisabled ()

Method isDisabled.

isEnabled

public boolean isEnabled ()

Method isEnabled.

setup0

protected void setup0 ()

Method setup0.

IllegalArgumentException

public new IllegalArgumentException (String.valueOf(this.state)

Method IllegalArgumentException.

Parameters:
String.valueOf(this.state String.valueOf(this.state

setup

protected void setup ()

Method setup.

start0

protected void start0 ()

Method start0.

start

protected void start ()

Method start.

shutdown0

protected void shutdown0 (final boolean shutdown)

Method shutdown0.

Parameters:
final boolean shutdown

shutdown

protected void shutdown ()

Method shutdown.

cleanup

public void cleanup (final boolean shutdown)

Method cleanup.

Parameters:
final boolean shutdown
See Also: