2022-04-23 09:45:44 +08:00
|
|
|
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;
|
2022-06-22 07:06:14 +08:00
|
|
|
public String[] loadAfter;
|
2022-04-23 09:45:44 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Attempts to validate this config instance.
|
2023-04-01 05:19:26 +08:00
|
|
|
*
|
2022-04-23 09:45:44 +08:00
|
|
|
* @return True if the config is valid, false otherwise.
|
|
|
|
*/
|
2022-06-22 07:06:14 +08:00
|
|
|
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
2022-04-23 09:45:44 +08:00
|
|
|
public boolean validate() {
|
|
|
|
return name != null && description != null && mainClass != null;
|
|
|
|
}
|
|
|
|
}
|