Skip to content

Commit

Permalink
Fixes a bug where admin command is not detected (#14)
Browse files Browse the repository at this point in the history
Top-level commands should be registred onLoad and not onEnable.
  • Loading branch information
BONNe committed Jul 8, 2023
1 parent 9a49482 commit 2417472
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ public void onLoad() {
saveDefaultConfig();
// Load settings from config.yml. This will check if there are any issues with it too.
loadSettings();
// Register command
new AdminCommand(this);
}

@Override
public void onEnable() {
// Plugin startup logic
new AdminCommand(this);
// Register listener
registerListener(new TreeGrowEvent(this));
}
Expand Down

0 comments on commit 2417472

Please sign in to comment.