From 923e578a1abea3819a6771d3561ce5ea59f8ec6a Mon Sep 17 00:00:00 2001 From: dmccoystephenson Date: Tue, 5 Oct 2021 23:41:17 -0600 Subject: [PATCH] Altered ActivityTracker.java and changed version to v0.2 --- pom.xml | 2 +- .../activitytracker/ActivityTracker.java | 18 +++++++++++++++++- src/main/resources/plugin.yml | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index bc7045d..cfc8170 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ dansplugins ActivityTracker - v0.2-alpha-1 + v0.2 jar ActivityTracker diff --git a/src/main/java/dansplugins/activitytracker/ActivityTracker.java b/src/main/java/dansplugins/activitytracker/ActivityTracker.java index af5c51d..753da84 100644 --- a/src/main/java/dansplugins/activitytracker/ActivityTracker.java +++ b/src/main/java/dansplugins/activitytracker/ActivityTracker.java @@ -6,11 +6,13 @@ import org.bukkit.command.CommandSender; import org.bukkit.plugin.java.JavaPlugin; +import java.io.File; + public final class ActivityTracker extends JavaPlugin { private static ActivityTracker instance; - private String version = "v0.2-alpha-1"; + private String version = "v0.2"; public static ActivityTracker getInstance() { return instance; @@ -19,7 +21,21 @@ public static ActivityTracker getInstance() { @Override public void onEnable() { instance = this; + + // create/load config + if (!(new File("./plugins/Mailboxes/config.yml").exists())) { + ConfigManager.getInstance().saveMissingConfigDefaultsIfNotPresent(); + } + else { + // pre load compatibility checks + if (isVersionMismatched()) { + ConfigManager.getInstance().saveMissingConfigDefaultsIfNotPresent(); + } + reloadConfig(); + } + EventRegistry.getInstance().registerEvents(); + StorageManager.getInstance().load(); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index b552fa8..d0cb12e 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,4 +1,4 @@ name: ActivityTracker -version: 0.2-alpha-1 +version: 0.2 main: dansplugins.activitytracker.ActivityTracker api-version: 1.13