Fix for NPE JsonTimerTask.java using wrong playerList

Removed unused PlayerList variable in MapManager.java
This commit is contained in:
Jason Booth 2011-02-23 17:07:04 -06:00
parent bd51387c10
commit a1d7805116
2 changed files with 1 additions and 3 deletions

View File

@ -35,7 +35,7 @@ class JsonTimerTask extends TimerTask {
update.timestamp = current; update.timestamp = current;
update.servertime = world.getTime() % 24000; update.servertime = world.getTime() % 24000;
Player[] players = mapManager.playerList.getVisiblePlayers(); Player[] players = plugin.playerList.getVisiblePlayers();
update.players = new Client.Player[players.length]; update.players = new Client.Player[players.length];
for (int i = 0; i < players.length; i++) { for (int i = 0; i < players.length; i++) {
Player p = players[i]; Player p = players[i];

View File

@ -24,8 +24,6 @@ public class MapManager {
public Map<String, DynmapWorld> worlds = new HashMap<String, DynmapWorld>(); public Map<String, DynmapWorld> worlds = new HashMap<String, DynmapWorld>();
public Map<String, DynmapWorld> inactiveworlds = new HashMap<String, DynmapWorld>(); public Map<String, DynmapWorld> inactiveworlds = new HashMap<String, DynmapWorld>();
public PlayerList playerList;
/* lock for our data structures */ /* lock for our data structures */
public static final Object lock = new Object(); public static final Object lock = new Object();