aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/Resurrection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/brysonsteck/Resurrection/Resurrection.java')
-rw-r--r--src/net/brysonsteck/Resurrection/Resurrection.java40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/net/brysonsteck/Resurrection/Resurrection.java b/src/net/brysonsteck/Resurrection/Resurrection.java
index 6a6492f..b3d9b99 100644
--- a/src/net/brysonsteck/Resurrection/Resurrection.java
+++ b/src/net/brysonsteck/Resurrection/Resurrection.java
@@ -48,24 +48,6 @@ public class Resurrection extends JavaPlugin implements Listener {
}
- System.out.println("[Resurrection] Locating the file \"playerData.resurrection\"...");
- // check if playerData.resurrection exists
- File playerFile = new File("plugins/playerData.resurrection");
- if (!playerFile.exists()) {
- System.out.println("[Resurrection] Player data file does not exist. Creating now in the \"plugins\" directory...");
- try {
- playerFile.createNewFile();
- System.out.println("[Resurrection] Player data file created successfully.");
- } catch (IOException e) {
- System.out.println("[Resurrection] An error has occurred creating the player data file!");
- e.printStackTrace();
- }
- } else {
- System.out.println("[Resurrection] The player data file has been found!");
- }
-
- System.out.println("[Resurrection] ---------------------------------------------------------");
-
// check for updates
System.out.println("[Resurrection] Checking for updates...");
CheckForUpdate check = new CheckForUpdate();
@@ -76,7 +58,7 @@ public class Resurrection extends JavaPlugin implements Listener {
if (pluginInfo.getVersion().equals(newestVersion)) {
System.out.println("[Resurrection] " + newestVersion + " is the latest version of Resurrection.");
} else {
- System.out.println("[Resurrection] A new version of Resurrection is available! (current: " + pluginInfo.getVersion() + ", newest: " + newestVersion);
+ System.out.println("[Resurrection] A new version of Resurrection is available! (current: " + pluginInfo.getVersion() + ", newest: " + newestVersion + ")");
System.out.println("[Resurrection] You can download the latest release on GitHub here \\/");
System.out.println("[Resurrection] " + newestVersionURL);
outdated = true;
@@ -85,6 +67,26 @@ public class Resurrection extends JavaPlugin implements Listener {
System.out.println("[Resurrection] ---------------------------------------------------------");
+ System.out.println("[Resurrection] Locating the file \"playerData.resurrection\"...");
+ // check if playerData.resurrection exists
+ File playerFile = new File("plugins/playerData.resurrection");
+ if (!playerFile.exists()) {
+ System.out.println("[Resurrection] Player data file does not exist. Creating now in the \"plugins\" directory...");
+ try {
+ playerFile.createNewFile();
+ System.out.println("[Resurrection] Player data file created successfully.");
+ } catch (IOException e) {
+ System.out.println("[Resurrection] An error has occurred creating the player data file!");
+ e.printStackTrace();
+ System.out.println("[Resurrection] This file is crucial to Resurrection. Since the file could not be created, the plugin will now stop.");
+ System.exit(1);
+ }
+ } else {
+ System.out.println("[Resurrection] The player data file has been found!");
+ }
+
+ System.out.println("[Resurrection] ---------------------------------------------------------");
+
System.out.println("[Resurrection] Registering listeners and adding commands...");
// register listener
this.getServer().getPluginManager().registerEvents(new PlayerListener(), this);