Class AbstractMindustryPlugin
java.lang.Object
mindustry.mod.Mod
mindustry.mod.Plugin
com.xpdustry.distributor.common.plugin.AbstractMindustryPlugin
- All Implemented Interfaces:
MindustryPlugin
- Direct Known Subclasses:
DistributorCommonPlugin
public abstract class AbstractMindustryPlugin
extends mindustry.mod.Plugin
implements MindustryPlugin
An abstract implementation of
It also registers the annotated methods of this plugin and its listeners in the event bus and the plugin scheduler automatically.
MindustryPlugin, without the quirks of Plugin (like the fact that
registerServerCommands(CommandHandler) is called before init()).
It also registers the annotated methods of this plugin and its listeners in the event bus and the plugin scheduler automatically.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(PluginListener listener) Adds aPluginListenerto this plugin.arc.files.FiDeprecated.protected final List<PluginListener>Returns an unmodifiable list of the listeners registered to this plugin.final org.slf4j.LoggerReturns the logger bound to this plugin.final PluginMetadataReturns the metadata of this plugin.protected PluginAnnotationParservoidinit()Deprecated.voidDeprecated.final voidregisterClientCommands(arc.util.CommandHandler handler) Deprecated.final voidregisterServerCommands(arc.util.CommandHandler handler) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.xpdustry.distributor.common.plugin.MindustryPlugin
getDirectory, onClientCommandsRegistration, onExit, onInit, onLoad, onServerCommandsRegistration, onUpdate
-
Constructor Details
-
AbstractMindustryPlugin
public AbstractMindustryPlugin()
-
-
Method Details
-
getMetadata
Description copied from interface:MindustryPluginReturns the metadata of this plugin.- Specified by:
getMetadatain interfaceMindustryPlugin
-
getLogger
public final org.slf4j.Logger getLogger()Description copied from interface:MindustryPluginReturns the logger bound to this plugin.- Specified by:
getLoggerin interfaceMindustryPlugin
-
getListeners
Returns an unmodifiable list of the listeners registered to this plugin. -
getPluginAnnotationParser
-
addListener
Description copied from interface:MindustryPluginAdds aPluginListenerto this plugin.- Specified by:
addListenerin interfaceMindustryPlugin- Parameters:
listener- the listener to add
-
registerServerCommands
Deprecated.- Overrides:
registerServerCommandsin classmindustry.mod.Mod
-
registerClientCommands
Deprecated.- Overrides:
registerClientCommandsin classmindustry.mod.Mod
-
init
Deprecated.- Overrides:
initin classmindustry.mod.Mod
-
loadContent
Deprecated.- Overrides:
loadContentin classmindustry.mod.Mod
-
getConfig
Deprecated.- Overrides:
getConfigin classmindustry.mod.Mod
-