Skip to content

Commit

Permalink
Add some plugin logging for loading and enabling
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jun 20, 2020
1 parent 0f333ee commit 708d3eb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public GeyserPlugin(PluginManager pluginManager, PluginClassLoader pluginClassLo
this.pluginManager = pluginManager;
this.pluginClassLoader = pluginClassLoader;
this.logger = new PluginLogger(this);

logger.info(String.format("Loading %s v%s", getName(), getVersion()));
}

// We provide some methods already provided in EventManager as we want to keep track of which EventHandlers
Expand Down Expand Up @@ -123,13 +125,15 @@ public void unregisterAllEvents() {
* Enable Plugin
*/
public void enable() {
logger.info(String.format("Enabling %s v%s", getName(), getVersion()));
getEventManager().triggerEvent(new PluginEnableEvent(this));
}

/**
* Disable Plugin
*/
public void disable() {
logger.info(String.format("Disabling %s v%s", getName(), getVersion()));
getEventManager().triggerEvent(new PluginDisableEvent(this));
}

Expand Down

0 comments on commit 708d3eb

Please sign in to comment.