mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Define getter for ClientGameLobby
Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package forge.interfaces;
|
||||
|
||||
import forge.match.GameLobby.GameLobbyData;
|
||||
import forge.net.client.ClientGameLobby;
|
||||
|
||||
public interface ILobbyListener {
|
||||
void message(String source, String message);
|
||||
void update(GameLobbyData state, int slot);
|
||||
void close();
|
||||
ClientGameLobby getLobby();
|
||||
}
|
||||
|
||||
@@ -76,6 +76,10 @@ public class NetConnectUtil {
|
||||
public final void close() {
|
||||
// NO-OP, server can't receive close message
|
||||
}
|
||||
@Override
|
||||
public ClientGameLobby getLobby() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
chatInterface.setGameClient(new IRemote() {
|
||||
@Override
|
||||
@@ -128,6 +132,10 @@ public class NetConnectUtil {
|
||||
SOptionPane.showMessageDialog("Your connection to the host (" + url + ") was interrupted.", "Error", FSkinProp.ICO_WARNING);
|
||||
onlineLobby.setClient(null);
|
||||
}
|
||||
@Override
|
||||
public ClientGameLobby getLobby() {
|
||||
return lobby;
|
||||
}
|
||||
});
|
||||
view.setPlayerChangeListener(new IPlayerChangeListener() {
|
||||
@Override
|
||||
|
||||
@@ -105,6 +105,10 @@ public class FGameClient implements IToServer {
|
||||
return replies.get(event.getId());
|
||||
}
|
||||
|
||||
List<ILobbyListener> getLobbyListeners() {
|
||||
return lobbyListeners;
|
||||
}
|
||||
|
||||
public void addLobbyListener(final ILobbyListener listener) {
|
||||
lobbyListeners.add(listener);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user