mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-26 18:47:40 +01:00
Added weather to json world output (hasStorm and isThundering)
This commit is contained in:
parent
c0479bff05
commit
bb45cc10cb
@ -6,6 +6,8 @@ public class Client {
|
|||||||
public static class Update {
|
public static class Update {
|
||||||
public long timestamp;
|
public long timestamp;
|
||||||
public long servertime;
|
public long servertime;
|
||||||
|
public boolean hasStorm;
|
||||||
|
public boolean isThundering;
|
||||||
public Player[] players;
|
public Player[] players;
|
||||||
public Object[] updates;
|
public Object[] updates;
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,8 @@ class JsonTimerTask extends TimerTask {
|
|||||||
|
|
||||||
update.timestamp = current;
|
update.timestamp = current;
|
||||||
update.servertime = world.getTime() % 24000;
|
update.servertime = world.getTime() % 24000;
|
||||||
|
update.hasStorm = world.hasStorm();
|
||||||
|
update.isThundering = world.isThundering();
|
||||||
|
|
||||||
Player[] players = plugin.playerList.getVisiblePlayers();
|
Player[] players = plugin.playerList.getVisiblePlayers();
|
||||||
update.players = new Client.Player[players.length];
|
update.players = new Client.Player[players.length];
|
||||||
|
@ -64,6 +64,8 @@ public class ClientUpdateHandler implements HttpHandler {
|
|||||||
Client.Update update = new Client.Update();
|
Client.Update update = new Client.Update();
|
||||||
update.timestamp = current;
|
update.timestamp = current;
|
||||||
update.servertime = world.getTime() % 24000;
|
update.servertime = world.getTime() % 24000;
|
||||||
|
update.hasStorm = world.hasStorm();
|
||||||
|
update.isThundering = world.isThundering();
|
||||||
|
|
||||||
|
|
||||||
Player[] players = playerList.getVisiblePlayers();
|
Player[] players = playerList.getVisiblePlayers();
|
||||||
|
Loading…
Reference in New Issue
Block a user