0
This repository has been archived on 2024-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ModuleLoader/src/com/redstoner/modules/Module.java

36 lines
1003 B
Java

package com.redstoner.modules;
import com.redstoner.annotations.Version;
/** Interface for the Module class. Modules must always have an empty constructor to be invoked by the ModuleLoader.
*
* @author Pepich */
@Version(major = 1, minor = 1, revision = 1, compatible = 1)
public interface Module
{
/** Will be called when the module gets enabled. */
public void onEnable();
/** Will be called when the module gets disabled. */
public void onDisable();
/** Will be called to check if a module is enabled or not.
*
* @return The status of the module, true when enabled, false when not. */
public boolean enabled();
/** Default implementation for the enable() method, returning weather the module was enabled or not.
*
* @return */
public default boolean enable()
{
onEnable();
return enabled();
}
/** Gets called on registration of the module.
*
* @return The String used for the CommandManager to register the commands. */
public String getCommandString();
}