aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/api/interfaces/IPlugin.java
blob: d70a19925e081e21a4ca7a36eab330187c2c51c2 (plain)
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
package gtPlusPlus.api.interfaces;

import gtPlusPlus.api.objects.Logger;

public interface IPlugin {

    /**
     * @return A {@link String} object which returns the {@link IPlugin}'s name.
     */
    public String getPluginName();

    /**
     * @return A {@link String} object which returns the {@link IPlugin}'s short name. This String should only contain 4
     *         Characters.
     */
    public String getPluginAbbreviation();

    /**
     * @param message - A {@link String} object which holds a message to be logged to console.
     */
    default void log(String message) {
        Logger.INFO("[" + getPluginAbbreviation() + "] " + message);
    }

    /**
     * @param message - A {@link String} object which holds a warning/error message to be logged to console.
     */
    default void logDebug(String message) {
        Logger.WARNING("[" + getPluginAbbreviation() + "] " + message);
    }

    public boolean preInit();

    public boolean init();

    public boolean postInit();

    public boolean serverStart();

    public boolean serverStop();
}