What is modulo...
How to use Modulo ?
- Create a new java project in your favorite IDE.
- Add the modulo-api dependency to your project.
- Manually with your IDE.
- With Maven add the following dependency to your pom.xml:
<dependency> <groupId>com.chillycheesy</groupId> <artifactId>modulo-api</artifactId> <version>BINKS-0.3.0</version> </dependency>
- With Gradle add the following dependency to your build.gradle: (recommended)
dependencies { implementation 'com.chillycheesy:modulo-api:BINKS-0.3.0' }
- Create a new java class in your project. The class must inherit from the Module class. This will become your main class.
- Implement the needed methods.
package com.chillycheesy.modulo; import com.chillycheesy.modulo.modules.Module; public class HelloModule extends Module { @Override protected void onLoad() { info("HelloModule is loaded"); } @Override protected void onStart() { info("HelloModule is started"); } @Override protected void onStop() { info("HelloModule is stopped"); } }
- Create the module.yml file in your project resources folder.
- The module.yml file must contain the following information:
name: HelloModule description: This is a hello module version: 1.0.0 main: com.chillycheesy.modulo.HelloModule # The main class of the module authors: - ChillyCheesy dependencies: [] # Optional softDependencies: [] # Optional
- The module.yml file must contain the following information:
- Download the modulo-server jar file.
- Build your project and drop it in the
modules
folder inside your server folder. - run the server with the following command:
$> java -jar modulo-server.jar
Enjoy 🌶 🧀 !
If you use gradle, you can use the ModuloGradleApplication.
See the Java documentation page here.
You can also check the wiki.
..----.._ _ .' .--. "-.(O)_ '-.__.-'"'=:| , _)_ \__ . c\'-.. ''------'---''---'-" Despelette was here !