Fixed the %online% macro requiring a player.

This commit is contained in:
sk89q 2011-06-26 23:41:30 -07:00
parent 4e295ea1eb
commit ea487eb6a4

View File

@ -763,13 +763,13 @@ public String replaceMacros(CommandSender sender, String message) {
message = message.replace("%name%", toName(sender)); message = message.replace("%name%", toName(sender));
message = message.replace("%id%", toUniqueName(sender)); message = message.replace("%id%", toUniqueName(sender));
message = message.replace("%online%", String.valueOf(online.length));
if (sender instanceof Player) { if (sender instanceof Player) {
Player player = (Player) sender; Player player = (Player) sender;
World world = player.getWorld(); World world = player.getWorld();
message = message.replace("%world%", world.getName()); message = message.replace("%world%", world.getName());
message = message.replace("%online%", String.valueOf(online.length));
message = message.replace("%health%", String.valueOf(player.getHealth())); message = message.replace("%health%", String.valueOf(player.getHealth()));
} }