aboutsummaryrefslogtreecommitdiffstats
path: root/src/me/fatpigsarefat/quests/commands/CommandQuests.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/me/fatpigsarefat/quests/commands/CommandQuests.java')
-rw-r--r--src/me/fatpigsarefat/quests/commands/CommandQuests.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/me/fatpigsarefat/quests/commands/CommandQuests.java b/src/me/fatpigsarefat/quests/commands/CommandQuests.java
index c6ffe540..7428e1c8 100644
--- a/src/me/fatpigsarefat/quests/commands/CommandQuests.java
+++ b/src/me/fatpigsarefat/quests/commands/CommandQuests.java
@@ -13,6 +13,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
+import org.bukkit.scheduler.BukkitRunnable;
public class CommandQuests implements CommandExecutor {
@@ -54,6 +55,20 @@ public class CommandQuests implements CommandExecutor {
}
sender.sendMessage(ChatColor.DARK_GRAY + "View info using /q a types [type].");
return true;
+ } else if (args[1].equalsIgnoreCase("update")) {
+ sender.sendMessage(ChatColor.GRAY + "Checking for updates...");
+ new BukkitRunnable() {
+ @Override
+ public void run() {
+ Quests.getUpdater().check();
+ if (Quests.getUpdater().isUpdateReady()) {
+ sender.sendMessage(Quests.getUpdater().getMessage());
+ } else {
+ sender.sendMessage(ChatColor.GRAY + "No updates were found.");
+ }
+ }
+ }.runTaskAsynchronously(Quests.getInstance());
+ return true;
}
} else if (args.length == 3) {
if (args[1].equalsIgnoreCase("opengui")) {
@@ -215,6 +230,7 @@ public class CommandQuests implements CommandExecutor {
sender.sendMessage(ChatColor.DARK_GRAY + " * " + ChatColor.RED + "/quests a moddata " + ChatColor.DARK_GRAY + ": view help for quest progression");
sender.sendMessage(ChatColor.DARK_GRAY + " * " + ChatColor.RED + "/quests a types [type]" + ChatColor.DARK_GRAY + ": view registered task types");
sender.sendMessage(ChatColor.DARK_GRAY + " * " + ChatColor.RED + "/quests a reload " + ChatColor.DARK_GRAY + ": reload Quests configuration");
+ sender.sendMessage(ChatColor.DARK_GRAY + " * " + ChatColor.RED + "/quests a update " + ChatColor.DARK_GRAY + ": check for updates");
}
sender.sendMessage(ChatColor.GRAY.toString() + ChatColor.STRIKETHROUGH + "-----=[" + ChatColor.RED + " requires permission: quests.admin " +
ChatColor.GRAY.toString() + ChatColor.STRIKETHROUGH + "]=-----");