summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/command/defaults/ClearCommand.java3
-rw-r--r--src/main/java/org/bukkit/command/defaults/DeopCommand.java3
-rw-r--r--src/main/java/org/bukkit/command/defaults/ExpCommand.java8
-rw-r--r--src/main/java/org/bukkit/command/defaults/GameModeCommand.java6
-rw-r--r--src/main/java/org/bukkit/command/defaults/GameRuleCommand.java2
-rw-r--r--src/main/java/org/bukkit/command/defaults/GiveCommand.java2
-rw-r--r--src/main/java/org/bukkit/command/defaults/ReloadCommand.java3
-rw-r--r--src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java7
-rw-r--r--src/main/java/org/bukkit/command/defaults/TeleportCommand.java2
-rw-r--r--src/main/java/org/bukkit/command/defaults/TellCommand.java1
10 files changed, 21 insertions, 16 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/ClearCommand.java b/src/main/java/org/bukkit/command/defaults/ClearCommand.java
index b5f2e3ef..ecbce018 100644
--- a/src/main/java/org/bukkit/command/defaults/ClearCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ClearCommand.java
@@ -60,9 +60,10 @@ public class ClearCommand extends VanillaCommand {
int data = args.length >= 3 ? getInteger(sender, args[2], 0) : -1;
int count = player.getInventory().clear(id, data);
+
Command.broadcastCommandMessage(sender, "Cleared the inventory of " + player.getDisplayName() + ", removing " + count + " items");
} else {
- sender.sendMessage(ChatColor.RED + "Can't find user " + args[0]);
+ sender.sendMessage(ChatColor.RED + "Can't find player " + args[0]);
}
return true;
diff --git a/src/main/java/org/bukkit/command/defaults/DeopCommand.java b/src/main/java/org/bukkit/command/defaults/DeopCommand.java
index 1ea6cadb..8815e134 100644
--- a/src/main/java/org/bukkit/command/defaults/DeopCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/DeopCommand.java
@@ -7,6 +7,7 @@ import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
+import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.util.StringUtil;
@@ -36,7 +37,7 @@ public class DeopCommand extends VanillaCommand {
((Player) player).sendMessage(ChatColor.YELLOW + "You are no longer op!");
}
- sender.sendMessage("De-opped " + args[0]);
+ Command.broadcastCommandMessage(sender, "De-opped " + args[0]);
return true;
}
diff --git a/src/main/java/org/bukkit/command/defaults/ExpCommand.java b/src/main/java/org/bukkit/command/defaults/ExpCommand.java
index 0c92e7fb..ffbfbaa3 100644
--- a/src/main/java/org/bukkit/command/defaults/ExpCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ExpCommand.java
@@ -49,10 +49,10 @@ public class ExpCommand extends VanillaCommand {
if (isLevel) {
if (isTaking) {
player.giveExpLevels(-amount);
- sender.sendMessage("Taken " + amount + " level(s) from " + player.getName());
+ Command.broadcastCommandMessage(sender, "Taken " + amount + " level(s) from " + player.getName());
} else {
player.giveExpLevels(amount);
- sender.sendMessage("Given " + amount + " level(s) to " + player.getName());
+ Command.broadcastCommandMessage(sender, "Given " + amount + " level(s) to " + player.getName());
}
} else {
if (isTaking) {
@@ -60,11 +60,11 @@ public class ExpCommand extends VanillaCommand {
return false;
} else {
player.giveExp(amount);
- sender.sendMessage("Given " + amount + " experience to " + player.getName());
+ Command.broadcastCommandMessage(sender, "Given " + amount + " experience to " + player.getName());
}
}
} else {
- sender.sendMessage("Can't find user, was one provided?\n" + ChatColor.RED + "Usage: " + usageMessage);
+ sender.sendMessage("Can't find player, was one provided?\n" + ChatColor.RED + "Usage: " + usageMessage);
return false;
}
diff --git a/src/main/java/org/bukkit/command/defaults/GameModeCommand.java b/src/main/java/org/bukkit/command/defaults/GameModeCommand.java
index 8721e20b..95593d71 100644
--- a/src/main/java/org/bukkit/command/defaults/GameModeCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/GameModeCommand.java
@@ -67,16 +67,16 @@ public class GameModeCommand extends VanillaCommand {
sender.sendMessage("Game mode change for " + player.getName() + " failed!");
} else {
if (player == sender) {
- Command.broadcastCommandMessage(sender, "Set own game mode to " + mode.toString() + " mode", false);
+ Command.broadcastCommandMessage(sender, "Set own game mode to " + mode.toString() + " mode");
} else {
- Command.broadcastCommandMessage(sender, "Set " + player.getName() + "'s game mode to " + mode.toString() + " mode", false);
+ Command.broadcastCommandMessage(sender, "Set " + player.getName() + "'s game mode to " + mode.toString() + " mode");
}
}
} else {
sender.sendMessage(player.getName() + " already has game mode " + mode.getValue());
}
} else {
- sender.sendMessage("Can't find user " + playerArg);
+ sender.sendMessage("Can't find player " + playerArg);
}
return true;
diff --git a/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java b/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java
index b5729039..774d23ba 100644
--- a/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java
@@ -37,7 +37,7 @@ public class GameRuleCommand extends VanillaCommand {
String value = args[1];
world.setGameRuleValue(rule, value);
- Command.broadcastCommandMessage(sender, "Game rule has been updated");
+ Command.broadcastCommandMessage(sender, "Game rule " + rule + " has been set to: " + value);
} else {
String value = world.getGameRuleValue(rule);
sender.sendMessage(rule + " = " + value);
diff --git a/src/main/java/org/bukkit/command/defaults/GiveCommand.java b/src/main/java/org/bukkit/command/defaults/GiveCommand.java
index 6010ac86..6ebc3eae 100644
--- a/src/main/java/org/bukkit/command/defaults/GiveCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/GiveCommand.java
@@ -68,7 +68,7 @@ public class GiveCommand extends VanillaCommand {
sender.sendMessage("There's no item called " + args[1]);
}
} else {
- sender.sendMessage("Can't find user " + args[0]);
+ sender.sendMessage("Can't find player " + args[0]);
}
return true;
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
index 7f820b3b..fb3c90fb 100644
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
@@ -4,6 +4,7 @@ import java.util.Arrays;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
+import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
public class ReloadCommand extends BukkitCommand {
@@ -20,7 +21,7 @@ public class ReloadCommand extends BukkitCommand {
if (!testPermission(sender)) return true;
Bukkit.reload();
- sender.sendMessage(ChatColor.GREEN + "Reload complete.");
+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete.");
return true;
}
diff --git a/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java b/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java
index 02dcd4f7..c15508e9 100644
--- a/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java
@@ -6,6 +6,7 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
+import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -36,7 +37,7 @@ public class SpawnpointCommand extends VanillaCommand {
} else {
player = Bukkit.getPlayerExact(args[0]);
if (player == null) {
- sender.sendMessage("Can't find user " + args[0]);
+ sender.sendMessage("Can't find player " + args[0]);
return true;
}
}
@@ -51,12 +52,12 @@ public class SpawnpointCommand extends VanillaCommand {
int z = getInteger(sender, args[pos], MIN_COORD, MAX_COORD);
player.setBedSpawnLocation(new Location(world, x, y, z), true);
- sender.sendMessage("Set " + player.getDisplayName() + "'s spawnpoint to " + x + ", " + y + ", " + z);
+ Command.broadcastCommandMessage(sender, "Set " + player.getDisplayName() + "'s spawnpoint to " + x + ", " + y + ", " + z);
}
} else if (args.length <= 1) {
Location location = player.getLocation();
player.setBedSpawnLocation(location, true);
- sender.sendMessage("Set " + player.getDisplayName() + "'s spawnpoint to " + location.getX() + ", " + location.getY() + ", " + location.getZ());
+ Command.broadcastCommandMessage(sender, "Set " + player.getDisplayName() + "'s spawnpoint to " + location.getX() + ", " + location.getY() + ", " + location.getZ());
} else {
sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
return false;
diff --git a/src/main/java/org/bukkit/command/defaults/TeleportCommand.java b/src/main/java/org/bukkit/command/defaults/TeleportCommand.java
index 77013afb..75d072ef 100644
--- a/src/main/java/org/bukkit/command/defaults/TeleportCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/TeleportCommand.java
@@ -51,7 +51,7 @@ public class TeleportCommand extends VanillaCommand {
if (args.length < 3) {
Player target = Bukkit.getPlayerExact(args[args.length - 1]);
if (target == null) {
- sender.sendMessage("Can't find user " + args[args.length - 1] + ". No tp.");
+ sender.sendMessage("Can't find player " + args[args.length - 1] + ". No tp.");
return true;
}
player.teleport(target, TeleportCause.COMMAND);
diff --git a/src/main/java/org/bukkit/command/defaults/TellCommand.java b/src/main/java/org/bukkit/command/defaults/TellCommand.java
index 56b3af7a..86705ab3 100644
--- a/src/main/java/org/bukkit/command/defaults/TellCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/TellCommand.java
@@ -41,6 +41,7 @@ public class TellCommand extends VanillaCommand {
Bukkit.getLogger().info("[" + sender.getName() + "->" + player.getName() + "] " + message);
}
+ sender.sendMessage("[" + sender.getName() + "->" + player.getName() + "] " + message);
player.sendMessage(result);
}