Update commands to match 1.3 vanilla commands

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
Bukkit/Spigot
2012-08-06 04:45:18 -05:00
parent d6f528e808
commit 3d3c769de0
17 changed files with 39 additions and 20 deletions

View File

@ -292,11 +292,15 @@ public abstract class Command {
}
public static void broadcastCommandMessage(CommandSender source, String message) {
broadcastCommandMessage(source, message, true);
}
public static void broadcastCommandMessage(CommandSender source, String message, boolean sendToSource) {
Set<Permissible> users = Bukkit.getPluginManager().getPermissionSubscriptions(Server.BROADCAST_CHANNEL_ADMINISTRATIVE);
String result = source.getName() + ": " + message;
String colored = ChatColor.GRAY + "(" + result + ")";
String colored = ChatColor.GRAY + "" + ChatColor.ITALIC + "[" + result + "]";
if (!(source instanceof ConsoleCommandSender)) {
if (sendToSource && !(source instanceof ConsoleCommandSender)) {
source.sendMessage(message);
}