Added timestamp support to Update Tiles and Chat.
New web config to handle for jsonfile method Modified webclient to handle timestamps to prevent duplication. Removed duplicate code in JsonTimerTask.java
This commit is contained in:
parent
13099587e0
commit
6ab82174a5
6 changed files with 18 additions and 9 deletions
|
|
@ -27,19 +27,23 @@ public class Client {
|
|||
public String type = "chat";
|
||||
public String playerName;
|
||||
public String message;
|
||||
public long timestamp;
|
||||
|
||||
public ChatMessage(String playerName, String message) {
|
||||
public ChatMessage(String playerName, String message, long timestamp) {
|
||||
this.playerName = playerName;
|
||||
this.message = message;
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Tile {
|
||||
public String type = "tile";
|
||||
public String name;
|
||||
public long timestamp;
|
||||
|
||||
public Tile(String name) {
|
||||
public Tile(String name, long timestamp) {
|
||||
this.name = name;
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue