From 38df91bafe0001851616c481ae122b744a58d924 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Tue, 15 Feb 2011 13:38:46 +0100 Subject: [PATCH] Report world for players in updates. --- src/main/java/org/dynmap/Client.java | 4 +++- src/main/java/org/dynmap/DynmapPlugin.java | 4 ++-- .../java/org/dynmap/web/handlers/ClientUpdateHandler.java | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/dynmap/Client.java b/src/main/java/org/dynmap/Client.java index e18f582c..d27f3e0b 100644 --- a/src/main/java/org/dynmap/Client.java +++ b/src/main/java/org/dynmap/Client.java @@ -11,10 +11,12 @@ public class Client { public static class Player { public String type = "player"; public String name; + public String world; public double x, y, z; - public Player(String name, double x, double y, double z) { + public Player(String name, String world, double x, double y, double z) { this.name = name; + this.world = world; this.x = x; this.y = y; this.z = z; diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 5791ef31..5514dae4 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -108,8 +108,8 @@ public class DynmapPlugin extends JavaPlugin { public void registerEvents() { BlockListener blockListener = new DynmapBlockListener(mapManager); - getServer().getPluginManager().registerEvent(Event.Type.BLOCK_PLACED, blockListener, Priority.Normal, this); - getServer().getPluginManager().registerEvent(Event.Type.BLOCK_DAMAGED, blockListener, Priority.Normal, this); + getServer().getPluginManager().registerEvent(Event.Type.BLOCK_PLACED, blockListener, Priority.Monitor, this); + getServer().getPluginManager().registerEvent(Event.Type.BLOCK_DAMAGED, blockListener, Priority.Monitor, this); PlayerListener playerListener = new DynmapPlayerListener(mapManager, playerList, configuration); getServer().getPluginManager().registerEvent(Event.Type.PLAYER_COMMAND, playerListener, Priority.Normal, this); diff --git a/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java b/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java index 6383722c..1ee6c674 100644 --- a/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java +++ b/src/main/java/org/dynmap/web/handlers/ClientUpdateHandler.java @@ -6,6 +6,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; +import org.bukkit.Location; import org.bukkit.Server; import org.bukkit.World; import org.bukkit.entity.Player; @@ -59,11 +60,12 @@ public class ClientUpdateHandler implements HttpHandler { update.servertime = world.getTime() % 24000; - Player[] players = playerList.getVisiblePlayers(worldName); + Player[] players = playerList.getVisiblePlayers(); update.players = new Client.Player[players.length]; for(int i=0;i