Skip to content

Commit

Permalink
Show a reloaded log when /bsb reload is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 13, 2020
1 parent d6b4b25 commit af096bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/world/bentobox/bskyblock/BSkyBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ public void onLoad() {
adminCommand = new AdminCommand(this);
}

private void loadSettings() {
private boolean loadSettings() {
// Load settings again to get worlds
settings = configObject.loadConfigObject();
if (settings == null) {
// Disable
logError("BSkyBlock settings could not load! Addon disabled.");
setState(State.DISABLED);
return false;
}
return true;
}

@Override
Expand All @@ -66,7 +68,9 @@ public void onDisable() {

@Override
public void onReload() {
loadSettings();
if (loadSettings()) {
log("Reloaded BSkyBlock settings");
}
}

/**
Expand Down

0 comments on commit af096bf

Please sign in to comment.