mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-18 18:05:05 +01:00
Plugin enabling & disabling
This commit is contained in:
@@ -7,22 +7,18 @@ import emu.grasscutter.server.game.GameServer;
|
||||
* The base class for all plugins to extend.
|
||||
*/
|
||||
public abstract class Plugin {
|
||||
private final PluginIdentifier identifier;
|
||||
private PluginIdentifier identifier;
|
||||
|
||||
/**
|
||||
* Empty constructor for developers.
|
||||
* Should not be called by users.
|
||||
*/
|
||||
public Plugin() {
|
||||
this(new PluginIdentifier("", "", "", new String[]{}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for plugins.
|
||||
* This method is reflected into.
|
||||
*
|
||||
* Set plugin variables.
|
||||
* @param identifier The plugin's identifier.
|
||||
*/
|
||||
public Plugin(PluginIdentifier identifier) {
|
||||
this.identifier = identifier;
|
||||
private void initializePlugin(PluginIdentifier identifier) {
|
||||
if(this.identifier == null)
|
||||
this.identifier = identifier;
|
||||
else Grasscutter.getLogger().warn(this.identifier.name + " had a reinitialization attempt.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user