|
1 | 1 | <div align="center">
|
2 | 2 |
|
3 | 3 | # Modulo
|
4 |
| -[]() |
| 4 | +[](https://github.com/ChillyCheesy/Modulo/actions) |
5 | 5 | [](https://search.maven.org/artifact/com.chillycheesy/modulo-api)
|
6 | 6 | [](https://github.com/ChillyCheesy/Modulo/releases)
|
7 | 7 |
|
|
10 | 10 |
|
11 | 11 | <div align="center">
|
12 | 12 |
|
13 |
| - |
14 |
| - |
15 |
| - |
| 13 | +[](https://github.com/ChillyCheesy/Modulo/blob/master/LICENSE.md) |
| 14 | +[](https://github.com/ChillyCheesy/Modulo/stargazers) |
| 15 | +[](https://github.com/ChillyCheesy/Modulo/network/members) |
16 | 16 |
|
17 | 17 | </div>
|
18 | 18 |
|
|
21 | 21 | ## Table of contents
|
22 | 22 | * [Description](#Description)
|
23 | 23 | * [Getting started](#GettingStarted)
|
| 24 | + * [Step 1](#GettingStarted-1) |
| 25 | + * [Step 2](#GettingStarted-2) |
| 26 | + * [Step 3](#GettingStarted-3) |
| 27 | + * [Step 4](#GettingStarted-4) |
| 28 | + * [Step 5](#GettingStarted-5) |
24 | 29 | * [How to use it](#HowToUseIt)
|
25 | 30 | * [See also](#SeeAlso)
|
26 | 31 | * [Cute cats](https://www.youtube.com/watch?v=VZrDxD0Za9I)
|
27 | 32 |
|
28 |
| -## Description 🐭 <a id="Description"></a> |
| 33 | +## 🐭 Description <a id="Description"></a> |
29 | 34 | What is modulo...
|
| 35 | +## 🚀 Getting started <a id="GettingStarted"></a> |
| 36 | +**How to use Modulo ?** |
| 37 | +### Step 1:<a id="GettingStarted-1"></a> |
| 38 | +* Create a new java project in your favorite IDE. |
| 39 | +* Add the modulo-api dependency to your project. |
| 40 | + * Manually with your IDE. |
| 41 | + * With Maven add the following dependency to your pom.xml: |
| 42 | + ```xml |
| 43 | + <dependency> |
| 44 | + <groupId>com.chillycheesy</groupId> |
| 45 | + <artifactId>modulo-api</artifactId> |
| 46 | + <version>0.1.2</version> |
| 47 | + </dependency> |
| 48 | + ``` |
| 49 | + * With Gradle add the following dependency to your build.gradle: *(recommended)* |
| 50 | + ```gradle |
| 51 | + dependencies { |
| 52 | + implementation 'com.chillycheesy:modulo-api:0.1.2' |
| 53 | + } |
| 54 | + ``` |
| 55 | +### Step 2:<a id="GettingStarted-2"></a> |
| 56 | +* Create a new java class in your project. The class must inherit from the Module class. This will become your main class. |
| 57 | +* Implement the needed methods. |
| 58 | + ```java |
| 59 | + package com.chillycheesy.modulo; |
| 60 | + |
| 61 | + import com.chillycheesy.modulo.modules.Module; |
| 62 | + |
| 63 | + public class HelloModule extends Module { |
| 64 | + |
| 65 | + @Override |
| 66 | + protected void onLoad() { |
| 67 | + info("HelloModule is loaded"); |
| 68 | + } |
| 69 | + |
| 70 | + @Override |
| 71 | + protected void onStart() { |
| 72 | + info("HelloModule is started"); |
| 73 | + } |
| 74 | + |
| 75 | + @Override |
| 76 | + protected void onStop() { |
| 77 | + info("HelloModule is stopped"); |
| 78 | + } |
| 79 | + |
| 80 | + } |
| 81 | + ``` |
| 82 | +### Step 3:<a id="GettingStarted-3"></a> |
| 83 | +* Create the module.yml file in your project resources folder. |
| 84 | + * The module.yml file must contain the following information: |
| 85 | + ```yml |
| 86 | + name: HelloModule |
| 87 | + description: This is a hello module |
| 88 | + version: 1.0.0 |
| 89 | + main: com.chillycheesy.modulo.HelloModule # The main class of the module |
| 90 | + authors: |
| 91 | + - ChillyCheesy |
| 92 | + dependencies: [] # Optional |
| 93 | + softDependencies: [] # Optional |
| 94 | + ``` |
| 95 | +### Step 4:<a id="GettingStarted-4"></a> |
| 96 | +* Download the [modulo-server jar file](https://github.com/ChillyCheesy/Modulo/releases). |
| 97 | +* Build your project and drop it in the ```modules``` folder inside your server folder. |
| 98 | +* run the server with the following command: |
| 99 | + ```bash |
| 100 | + $> java -jar modulo-server.jar |
| 101 | + ``` |
30 | 102 |
|
31 |
| -## Getting started 🚀 <a id="GettingStarted"></a> |
32 |
| -How to begin... |
| 103 | +### Step 5:<a id="GettingStarted-5"></a> |
| 104 | +**Enjoy 🌶 🧀 !** |
33 | 105 |
|
34 |
| -## How to use it 📕 <a id="HowToUseIt"></a> |
35 |
| -See the documentation page [here](https://chillycheesy.github.io/Modulo/). |
| 106 | +*If you use gradle, you can use the [ModuloGradleApplication](https://github.com/ChillyCheesy/ModuloGradleApplication).* |
| 107 | + |
| 108 | +## 📕 How to use it <a id="HowToUseIt"></a> |
| 109 | +See the Java documentation page [here](https://chillycheesy.github.io/Modulo/). |
36 | 110 | You can also check the [wiki](https://github.com/ChillyCheesy/Modulo/wiki).
|
37 | 111 |
|
38 |
| -## See also 🧀🌶 <a id="SeeAlso"></a> |
| 112 | +## 🌶 🧀 See also <a id="SeeAlso"></a> |
39 | 113 | * [ModuloGradleApplication](https://github.com/ChillyCheesy/ModuloGradleApplication)
|
40 | 114 |
|
41 | 115 | <pre>
|
42 | 116 | ..----.._ _
|
43 | 117 | .' .--. "-.(O)_
|
44 |
| -<font color="red">'-.__.-'"'=:</font>| , _)_ \__ . c\'-.. |
| 118 | +'-.__.-'"'=:| , _)_ \__ . c\'-.. |
45 | 119 | ''------'---''---'-"
|
46 | 120 | Despelette was here !
|
47 |
| -</pre> |
| 121 | +</pre> |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
0 commit comments