aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/Resurrection.java
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-07-04 00:15:56 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-07-04 00:15:56 -0600
commit2bc8c99f5a0155e374d84a6f7e0f68761e99a14a (patch)
treed70199f89ae83f40cb6c2bb309a89238d4866c87 /src/net/brysonsteck/Resurrection/Resurrection.java
parent2352b42b13db966b76f97d8af62fb22339841c83 (diff)
downloadresurrection-2bc8c99f5a0155e374d84a6f7e0f68761e99a14a.tar
resurrection-2bc8c99f5a0155e374d84a6f7e0f68761e99a14a.tar.gz
resurrection-2bc8c99f5a0155e374d84a6f7e0f68761e99a14a.tar.bz2
added howlong command
Diffstat (limited to 'src/net/brysonsteck/Resurrection/Resurrection.java')
-rw-r--r--src/net/brysonsteck/Resurrection/Resurrection.java24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/net/brysonsteck/Resurrection/Resurrection.java b/src/net/brysonsteck/Resurrection/Resurrection.java
index 4692a7f..49a328b 100644
--- a/src/net/brysonsteck/Resurrection/Resurrection.java
+++ b/src/net/brysonsteck/Resurrection/Resurrection.java
@@ -1,8 +1,8 @@
package net.brysonsteck.Resurrection;
import net.brysonsteck.Resurrection.commands.CommandAbout;
+import net.brysonsteck.Resurrection.commands.CommandHowLong;
import net.brysonsteck.Resurrection.commands.CommandResurrect;
-import net.brysonsteck.Resurrection.player.PlayerData;
import net.brysonsteck.Resurrection.player.PlayerListener;
import net.brysonsteck.Resurrection.startup.CheckForUpdate;
import org.bukkit.event.Listener;
@@ -11,7 +11,6 @@ import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
import java.io.IOException;
-import java.util.Hashtable;
public class Resurrection extends JavaPlugin implements Listener {
@@ -69,14 +68,16 @@ public class Resurrection extends JavaPlugin implements Listener {
// check for updates
System.out.println("[Resurrection] Checking for updates...");
CheckForUpdate check = new CheckForUpdate();
- String newestVersion = check.getVersion();
- String newestVersionURL = check.getVersionURL();
- 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] You can download the latest release on GitHub here \\/");
- System.out.println("[Resurrection] " + newestVersionURL);
+ if (check.isSuccess()) {
+ String newestVersion = check.getVersion();
+ String newestVersionURL = check.getVersionURL();
+ 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] You can download the latest release on GitHub here \\/");
+ System.out.println("[Resurrection] " + newestVersionURL);
+ }
}
System.out.println("[Resurrection] ---------------------------------------------------------");
@@ -86,8 +87,9 @@ public class Resurrection extends JavaPlugin implements Listener {
this.getServer().getPluginManager().registerEvents(new PlayerListener(), this);
// register commands
- this.getCommand("about").setExecutor(new CommandAbout());
+ this.getCommand("about").setExecutor(new CommandAbout(pluginInfo.getVersion()));
this.getCommand("resurrect").setExecutor(new CommandResurrect());
+ this.getCommand("howlong").setExecutor(new CommandHowLong());
System.out.println("[Resurrection] ---------------------------------------------------------");
System.out.println("[Resurrection] Successfully Started!");