Skip to content

Commit

Permalink
🔧 feat(DimensionalHome): Close #23, Have a configuration file for dis…
Browse files Browse the repository at this point in the history
…abling dimensionalhome world
  • Loading branch information
ProfElements committed Feb 2, 2021
1 parent 43cdee8 commit 69a05cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/main/java/me/profelements/dynatech/DynaTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ public class DynaTech extends JavaPlugin implements SlimefunAddon {

@Override
public void onEnable() {
WorldCreator worldCreator = new WorldCreator("dimensionalhome");
worldCreator.generator(new DimensionalHomeDimension());
worldCreator.createWorld();

instance = this;
Config cfg = new Config(this);
final Metrics metrics = new Metrics(this, 9689);

if (!cfg.getBoolean("options.disable-dimensionalhome-world")) {
WorldCreator worldCreator = new WorldCreator("dimensionalhome");
worldCreator.generator(new DimensionalHomeDimension());
worldCreator.createWorld();
}



if (cfg.getBoolean("options.auto-update")) {
new GitHubBuildsUpdater(this, getFile(), "ProfElements/DynaTech/master").start();
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
options:
auto-update: true
auto-update: true
disable-dimensionalhome-world: false

0 comments on commit 69a05cd

Please sign in to comment.