From ea487eb6a4942ac683ec7d44dac79094fbb10b03 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 26 Jun 2011 23:41:30 -0700 Subject: [PATCH] Fixed the %online% macro requiring a player. --- src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java index 7704d696..cf0c4cc0 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java @@ -763,13 +763,13 @@ public String replaceMacros(CommandSender sender, String message) { message = message.replace("%name%", toName(sender)); message = message.replace("%id%", toUniqueName(sender)); + message = message.replace("%online%", String.valueOf(online.length)); if (sender instanceof Player) { Player player = (Player) sender; World world = player.getWorld(); message = message.replace("%world%", world.getName()); - message = message.replace("%online%", String.valueOf(online.length)); message = message.replace("%health%", String.valueOf(player.getHealth())); }