aboutsummaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2022-01-15 23:27:05 -0700
committerBryson Steck <steck.bryson@gmail.com>2022-01-15 23:27:05 -0700
commit939ef8559410aac8be2e09db8acc83648d2e9d31 (patch)
tree344e19581314f7464307175e89e537b7a84b8e7e /src/net
parent23ff6e31d28f6687f9fae08cf690f61c8a892712 (diff)
downloadresurrection-939ef8559410aac8be2e09db8acc83648d2e9d31.tar
resurrection-939ef8559410aac8be2e09db8acc83648d2e9d31.tar.gz
resurrection-939ef8559410aac8be2e09db8acc83648d2e9d31.tar.bz2
added a message from the server, now ready for release
Diffstat (limited to 'src/net')
-rw-r--r--src/net/brysonsteck/Resurrection/Resurrection.java18
-rw-r--r--src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java6
2 files changed, 18 insertions, 6 deletions
diff --git a/src/net/brysonsteck/Resurrection/Resurrection.java b/src/net/brysonsteck/Resurrection/Resurrection.java
index 9170807..a979509 100644
--- a/src/net/brysonsteck/Resurrection/Resurrection.java
+++ b/src/net/brysonsteck/Resurrection/Resurrection.java
@@ -67,14 +67,20 @@ public class Resurrection extends JavaPlugin implements Listener {
if (check.isSuccess()) {
String newestVersion = check.getVersion();
String newestVersionURL = check.getVersionURL();
+ String message = check.getMessage();
if (pluginInfo.getVersion().equals(newestVersion)) {
log.info(newestVersion + " is the latest version of Resurrection.");
- } else {
- log.info("A new version of Resurrection is available! (current: " + pluginInfo.getVersion() + ", newest: " + newestVersion + ")");
- log.info("You can download the latest release on GitHub here \\/");
- log.info(newestVersionURL);
- outdated = true;
- }
+ } else {
+ log.info("A new version of Resurrection is available! (current: " + pluginInfo.getVersion() + ", newest: " + newestVersion + ")");
+ log.info("You can download the latest release on GitHub here \\/");
+ log.info(newestVersionURL);
+ outdated = true;
+ }
+ if (!message.equals("\"\"")) {
+ log.info("---------------------------------------------------------");
+ log.warning("A message from the developer has been sent from the update server: " + message);
+ }
+
}
log.info("---------------------------------------------------------");
diff --git a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
index 59c7b30..1e85cf7 100644
--- a/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
+++ b/src/net/brysonsteck/Resurrection/startup/CheckForUpdate.java
@@ -18,6 +18,7 @@ public class CheckForUpdate {
boolean success;
String version;
String versionURL;
+ String message;
Logger log = JavaPlugin.getProvidingPlugin(Resurrection.class).getLogger();
public CheckForUpdate() {
@@ -30,6 +31,7 @@ public class CheckForUpdate {
version = softwareObj.get("current-release").toString();
version = version.replace("\"", "");
versionURL = softwareObj.get("github-release").toString();
+ message = softwareObj.get("message").toString();
success = true;
} catch (IOException e) {
log.warning("An error has occurred while attempting to check for updates.");
@@ -64,4 +66,8 @@ public class CheckForUpdate {
public String getVersion() {
return version;
}
+
+ public String getMessage() {
+ return message;
+ }
}