0

Added defaults for onEnable and onDisable

This commit is contained in:
minenash 2017-03-02 18:37:29 -05:00
parent f766925bde
commit 2e308f2c7b

View File

@ -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. /** Interface for the Module class. Modules must always have an empty constructor to be invoked by the ModuleLoader.
* *
* @author Pepich */ * @author Pepich */
@Version(major = 1, minor = 1, revision = 1, compatible = 1) @Version(major = 1, minor = 2, revision = 0, compatible = 1)
public interface Module public interface Module
{ {
/** Will be called when the module gets enabled. */ /** 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. */ /** Will be called when the module gets disabled. */
public void onDisable(); public default void onDisable()
{}
/** Gets called on registration of the module. /** Gets called on registration of the module.
* *