diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-07-04 00:53:34 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-07-04 00:53:34 -0600 |
commit | a83fcc7f5206c6c2b07e7340b97d738f86f3f8c1 (patch) | |
tree | ca78376dbfc80af0563fdeba5d239499d2ba84e3 /src/net/brysonsteck/Resurrection/commands | |
parent | bfb50b1955e74cc0439f01a8e78e265f2d5095fc (diff) | |
download | resurrection-a83fcc7f5206c6c2b07e7340b97d738f86f3f8c1.tar resurrection-a83fcc7f5206c6c2b07e7340b97d738f86f3f8c1.tar.gz resurrection-a83fcc7f5206c6c2b07e7340b97d738f86f3f8c1.tar.bz2 |
added info to about command
Diffstat (limited to 'src/net/brysonsteck/Resurrection/commands')
-rw-r--r-- | src/net/brysonsteck/Resurrection/commands/CommandAbout.java | 19 | ||||
-rw-r--r-- | src/net/brysonsteck/Resurrection/commands/CommandHowLong.java | 6 |
2 files changed, 19 insertions, 6 deletions
diff --git a/src/net/brysonsteck/Resurrection/commands/CommandAbout.java b/src/net/brysonsteck/Resurrection/commands/CommandAbout.java index 40ea0a8..aedf0be 100644 --- a/src/net/brysonsteck/Resurrection/commands/CommandAbout.java +++ b/src/net/brysonsteck/Resurrection/commands/CommandAbout.java @@ -1,5 +1,6 @@ package net.brysonsteck.Resurrection.commands; +import net.brysonsteck.Resurrection.startup.CheckForUpdate; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -8,10 +9,11 @@ import org.bukkit.entity.Player; public class CommandAbout implements CommandExecutor { String currentVersion; - boolean checked = false; + boolean outdated; - public CommandAbout(String currentVersion) { + public CommandAbout(String currentVersion, boolean outdated) { this.currentVersion = currentVersion; + this.outdated = outdated; } @Override @@ -25,7 +27,18 @@ public class CommandAbout implements CommandExecutor { if (commandSender instanceof Player) { Player p = (Player) commandSender; - p.sendMessage(aboutMessage); + p.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "Resurrection" + ChatColor.RESET); + p.sendMessage(""); + p.sendMessage(ChatColor.YELLOW + "Resurrection is a Spigot Minecraft plugin that forces players to wait 24 hours before respawning."); + p.sendMessage(ChatColor.YELLOW + "This server is running version " + ChatColor.AQUA + currentVersion + ChatColor.YELLOW + " of Resurrection."); + p.sendMessage(""); + if (outdated) { + p.sendMessage(ChatColor.RED + "A newer version of this plugin is available. Please notify a server admin to update this plugin for new features and/or stability improvements."); + p.sendMessage(""); + } + p.sendMessage(ChatColor.YELLOW + "\u00a9 2021 Bryson Steck"); + p.sendMessage(ChatColor.YELLOW + "This plugin is licensed under the GNU Affero General Public License v3.0. Read more here: "); + p.sendMessage(ChatColor.YELLOW + "For more information on this plugin or to download it for yourself, visit the GitHub repository at https://github.com/brysonsteck/resurrection"); } else { System.out.println(aboutMessage); } diff --git a/src/net/brysonsteck/Resurrection/commands/CommandHowLong.java b/src/net/brysonsteck/Resurrection/commands/CommandHowLong.java index 72daf30..ecb955b 100644 --- a/src/net/brysonsteck/Resurrection/commands/CommandHowLong.java +++ b/src/net/brysonsteck/Resurrection/commands/CommandHowLong.java @@ -73,7 +73,7 @@ public class CommandHowLong implements CommandExecutor { Player p = Bukkit.getPlayer(strings[0]); if (p == null) { - commandSender.sendMessage(ChatColor.RED + "ERROR: Player does not exist or is offline!"); + System.out.println(ChatColor.RED + "[Resurrection] ERROR: Player does not exist or is offline!"); return false; } @@ -90,13 +90,13 @@ public class CommandHowLong implements CommandExecutor { TimeCheck timeCheck = new TimeCheck(resurrectionTime - currentTime); - commandSender.sendMessage(p.getDisplayName() + " will respawn in " + timeCheck.formatTime()); + System.out.println("[Resurrection] " + p.getDisplayName() + " will respawn in " + timeCheck.formatTime()); return true; } } } - commandSender.sendMessage("ERROR: An error has occurred while trying to get time information. This is a bug in the program and not your fault."); + System.out.println("[Resurrection] ERROR: An error has occurred while trying to get time information. This is a bug in the program and not your fault."); return false; } } |