Added defaults for onEnable and onDisable
This commit is contained in:
parent
f766925bde
commit
2e308f2c7b
@ -5,14 +5,17 @@ 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)
|
||||
@Version(major = 1, minor = 2, revision = 0, compatible = 1)
|
||||
public interface Module
|
||||
{
|
||||
/** Will be called when the module gets enabled. */
|
||||
public boolean onEnable();
|
||||
public default boolean onEnable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Will be called when the module gets disabled. */
|
||||
public void onDisable();
|
||||
public default void onDisable()
|
||||
{}
|
||||
|
||||
/** Gets called on registration of the module.
|
||||
*
|
||||
|
Reference in New Issue
Block a user