From 33e075095968d5c71a450b2f3238838f39c49af8 Mon Sep 17 00:00:00 2001 From: Wizjany Date: Sat, 14 May 2011 13:19:02 -0400 Subject: [PATCH] General commands now use flags as intended --- .../bukkit/commands/GeneralCommands.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java b/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java index 316428c4..7a841c9c 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java @@ -36,7 +36,7 @@ public class GeneralCommands { @Command(aliases = {"god"}, usage = "[player]", desc = "Enable godmode on a player", - flags = "", min = 0, max = 1) + flags = "s", min = 0, max = 1) public static void god(CommandContext args, WorldGuardPlugin plugin, CommandSender sender) throws CommandException { ConfigurationManager config = plugin.getGlobalConfiguration(); @@ -84,7 +84,7 @@ public static void god(CommandContext args, WorldGuardPlugin plugin, @Command(aliases = {"ungod"}, usage = "[player]", desc = "Disable godmode on a player", - flags = "", min = 0, max = 1) + flags = "s", min = 0, max = 1) public static void ungod(CommandContext args, WorldGuardPlugin plugin, CommandSender sender) throws CommandException { ConfigurationManager config = plugin.getGlobalConfiguration(); @@ -124,14 +124,14 @@ public static void ungod(CommandContext args, WorldGuardPlugin plugin, // The player didn't receive any items, then we need to send the // user a message so s/he know that something is indeed working if (!included && args.hasFlag('s')) { - sender.sendMessage(ChatColor.YELLOW.toString() + "Players now have god mode."); + sender.sendMessage(ChatColor.YELLOW.toString() + "Players no longer have god mode."); } } @Command(aliases = {"heal"}, usage = "[player]", desc = "Heal a player", - flags = "", min = 0, max = 1) + flags = "s", min = 0, max = 1) public static void heal(CommandContext args, WorldGuardPlugin plugin, CommandSender sender) throws CommandException { @@ -177,7 +177,7 @@ public static void heal(CommandContext args, WorldGuardPlugin plugin, @Command(aliases = {"slay"}, usage = "[player]", desc = "Slay a player", - flags = "", min = 0, max = 1) + flags = "s", min = 0, max = 1) public static void slay(CommandContext args, WorldGuardPlugin plugin, CommandSender sender) throws CommandException { @@ -202,12 +202,12 @@ public static void slay(CommandContext args, WorldGuardPlugin plugin, // Tell the user if (player.equals(sender)) { - player.sendMessage(ChatColor.YELLOW + "Slayed!"); + player.sendMessage(ChatColor.YELLOW + "Slain!"); // Keep track of this included = true; } else { - player.sendMessage(ChatColor.YELLOW + "Slayed by " + player.sendMessage(ChatColor.YELLOW + "Slain by " + plugin.toName(sender) + "."); } @@ -216,7 +216,7 @@ public static void slay(CommandContext args, WorldGuardPlugin plugin, // The player didn't receive any items, then we need to send the // user a message so s/he know that something is indeed working if (!included && args.hasFlag('s')) { - sender.sendMessage(ChatColor.YELLOW.toString() + "Players slayed."); + sender.sendMessage(ChatColor.YELLOW.toString() + "Players slain."); } }