forked from ServerOpenMC/PluginV2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommandsManager.java
More file actions
52 lines (47 loc) · 1.57 KB
/
Copy pathCommandsManager.java
File metadata and controls
52 lines (47 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package fr.openmc.core;
import fr.openmc.api.cooldown.CooldownInterceptor;
import fr.openmc.core.commands.debug.ChronometerCommand;
import fr.openmc.core.commands.debug.CustomItemCommand;
import fr.openmc.core.commands.debug.ToastCommand;
import fr.openmc.core.commands.fun.Diceroll;
import fr.openmc.core.commands.fun.Playtime;
import fr.openmc.core.commands.utils.RTPCommands;
import fr.openmc.core.commands.utils.Restart;
import fr.openmc.core.commands.utils.Socials;
import fr.openmc.core.features.credits.CreditsCommand;
import lombok.Getter;
import revxrsal.commands.Lamp;
import revxrsal.commands.bukkit.BukkitLamp;
/**
* Enregistrement des commandes globales du plugin.
* Initialise Lamp et ajoute l'ensemble des commandes exposees.
*/
public class CommandsManager {
@Getter
static Lamp handler;
/**
* Initialise le handler de commandes et enregistre les commandes.
*/
public static void init() {
handler = BukkitLamp.builder(OMCPlugin.getInstance())
.commandCondition(new CooldownInterceptor())
.build();
registerCommands();
}
/**
* Enregistre toutes les commandes du plugin sur le handler.
*/
private static void registerCommands() {
handler.register(
new Socials(),
new RTPCommands(),
new Playtime(),
new Diceroll(),
new ChronometerCommand(),
new Restart(),
new CreditsCommand(),
new CustomItemCommand(),
new ToastCommand()
);
}
}