forked from External/mage
Added possibility to show tournament panel and watch tournament games (if allowed at tournament start) for spectators .
This commit is contained in:
parent
001f8ec1e6
commit
9838dea551
24 changed files with 520 additions and 311 deletions
|
|
@ -309,6 +309,10 @@ public class GameController implements GameCallback {
|
|||
}
|
||||
|
||||
public void watch(UUID userId) {
|
||||
if (userPlayerMap.get(userId) != null) {
|
||||
// You can't watch a game if you already a player in it
|
||||
return;
|
||||
}
|
||||
User user = UserManager.getInstance().getUser(userId);
|
||||
if (user != null) {
|
||||
GameWatcher gameWatcher = new GameWatcher(userId, game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue