Skip to content

Commit

Permalink
Add config check to extension
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Dec 15, 2024
1 parent 673b1b0 commit 5d9e5c1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ public void onPostInitialize(GeyserPostInitializeEvent event) {
// Load the config file
config = ConfigLoader.load(this, MCXboxBroadcastExtension.class, ExtensionConfig.class);

// Make sure we loaded a config and disable the extension if we didn't
if (config == null) {
logger.error("Failed to load config, extension will not start!");
this.disable();
return;
}

// TODO Support multiple notification types
notificationManager = new SlackNotificationManager(logger, config.slackWebhook());

Expand Down

0 comments on commit 5d9e5c1

Please sign in to comment.