Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs committed Nov 22, 2023
1 parent 6971293 commit a2d3e1f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/main/java/de/eldoria/bigdoorsopener/core/BigDoorsOpener.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -155,7 +156,7 @@ public void onPostStart(boolean reload) {

// Check for updates
if (config.isCheckUpdates()) {
Updater.lyna(LynaUpdateData.builder(this,3 )
Updater.lyna(LynaUpdateData.builder(this, 3)
.notifyPermission("bdo.command.reload")
.updateUrl("https://discord.gg/JJdx3xe")
.build())
Expand Down Expand Up @@ -341,9 +342,16 @@ private Pair<String, String> getDoorsVersion(String ver) {
}
return new Pair<>(versionString, buildString);
}


/**
* Returns the configuration for the doors.
* <p>
* The config is loaded after the server ticked for the first time.
*
* @return The configuration
*/
@NotNull
public Config getDoorsConfig() {
return config;
return Objects.requireNonNull(config, "Do not call before server is fully initialized.");
}
}

0 comments on commit a2d3e1f

Please sign in to comment.