Skip to content

ChillyCheesy/Modulo

Repository files navigation

Modulo

Build App maven-central Release

License Stars Forks


Table of contents

🐭 Description

What is modulo...

🚀 Getting started

How to use Modulo ?

Step 1:

  • 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'
      }

Step 2:

  • 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");
        }
    
    }

Step 3:

  • 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

Step 4:

  • 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

Step 5:

Enjoy 🌶 🧀 !

If you use gradle, you can use the ModuloGradleApplication.

📕 How to use it

See the Java documentation page here.
You can also check the wiki.

🌶 🧀 See also

              ..----.._    _
            .' .--.    "-.(O)_
'-.__.-'"'=:|  ,  _)_ \__ . c\'-..
            ''------'---''---'-"
            Despelette was here !