forked from Maxlego08/zEssentials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.java
More file actions
67 lines (54 loc) · 1.34 KB
/
Module.java
File metadata and controls
67 lines (54 loc) · 1.34 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package fr.maxlego08.essentials.api.modules;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.event.Listener;
import java.io.File;
/**
* Represents a module in the plugin system.
*/
public interface Module extends Listener {
/**
* Gets the name of the module.
*
* @return The name of the module.
*/
String getName();
/**
* Loads the configuration for the module.
*/
void loadConfiguration();
/**
* Retrieves the configuration file associated with the module.
*
* @return The configuration file.
*/
File getConfigurationFile();
/**
* Gets the folder associated with the module.
*
* @return The folder associated with the module.
*/
File getFolder();
/**
* Gets the configuration for the module.
*
* @return The configuration for the module.
*/
YamlConfiguration getConfiguration();
/**
* Checks if the module is enabled.
*
* @return true if the module is enabled, false otherwise.
*/
boolean isEnable();
/**
* Checks if the module registers events.
*
* @return true if the module registers events, false otherwise.
*/
boolean isRegisterEvent();
/**
* Called when the module is being disabled.
*/
default void onDisable() {
}
}