Adding server time to game hall feed.
This commit is contained in:
@@ -3,6 +3,8 @@ package com.gempukku.lotro.hall;
|
||||
import java.util.Set;
|
||||
|
||||
public interface HallInfoVisitor {
|
||||
public void serverTime(String time);
|
||||
|
||||
public void playerIsWaiting(boolean waiting);
|
||||
|
||||
public void visitTable(String tableId, String gameId, boolean noSpectators, String tableStatus, String formatName, String tournamentName, Set<String> playerIds, String winner);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.gempukku.lotro.hall;
|
||||
|
||||
import com.gempukku.lotro.AbstractServer;
|
||||
import com.gempukku.lotro.DateUtils;
|
||||
import com.gempukku.lotro.chat.ChatRoomMediator;
|
||||
import com.gempukku.lotro.chat.ChatServer;
|
||||
import com.gempukku.lotro.collection.CollectionsManager;
|
||||
@@ -247,6 +248,7 @@ public class HallServer extends AbstractServer {
|
||||
try {
|
||||
_lastVisitedPlayers.put(player, System.currentTimeMillis());
|
||||
visitor.playerIsWaiting(isPlayerBusy(player.getName()));
|
||||
visitor.serverTime(DateUtils.getStringDateWithHour());
|
||||
|
||||
// First waiting
|
||||
for (Map.Entry<String, AwaitingTable> tableInformation : _awaitingTables.entrySet()) {
|
||||
|
||||
@@ -245,6 +245,11 @@ public class HallResource extends AbstractResource {
|
||||
_hall = hall;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serverTime(String time) {
|
||||
_hall.setAttribute("serverTime", time);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playerIsWaiting(boolean waiting) {
|
||||
_hall.setAttribute("waiting", String.valueOf(waiting));
|
||||
|
||||
Reference in New Issue
Block a user