PluginConfig.java 564 Bytes
Newer Older
KingRainbow44's avatar
KingRainbow44 committed
1
2
3
4
5
6
7
8
9
package emu.grasscutter.plugin;

/**
 * The data contained in the plugin's `plugin.json` file.
 */
public final class PluginConfig {
    public String name, description, version;
    public String mainClass;
    public String[] authors;
KingRainbow44's avatar
KingRainbow44 committed
10
    public String[] loadAfter;
KingRainbow44's avatar
KingRainbow44 committed
11
12
13
14
15

    /**
     * Attempts to validate this config instance.
     * @return True if the config is valid, false otherwise.
     */
KingRainbow44's avatar
KingRainbow44 committed
16
    @SuppressWarnings("BooleanMethodIsAlwaysInverted")
KingRainbow44's avatar
KingRainbow44 committed
17
18
19
20
    public boolean validate() {
        return name != null && description != null && mainClass != null;
    }
}