Package mage.server

Examples of mage.server.User


        this.markedCard = null;
    }

    public boolean init() {
        if (!killed) {
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                if (futureTimeout != null && !futureTimeout.isDone()) {
                    int remaining = (int) futureTimeout.getDelay(TimeUnit.SECONDS);
                    user.fireCallback(new ClientCallback("draftInit", draft.getId(), new DraftClientMessage(getDraftPickView(remaining))));
                }
                return true;
            }
        }
        return false;
View Full Code Here


        return false;
    }

    public void update() {
        if (!killed) {
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                user.fireCallback(new ClientCallback("draftUpdate", draft.getId(), getDraftView()));
            }
        }
    }
View Full Code Here

    // not used
    //
    public void inform(final String message) {
        if (!killed) {
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                user.fireCallback(new ClientCallback("draftInform", draft.getId(), new DraftClientMessage(getDraftView(), message)));
            }
        }
    }
View Full Code Here

        }
    }

    public void draftOver() {
        if (!killed) {
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                user.fireCallback(new ClientCallback("draftOver", draft.getId()));
            }
        }
    }
View Full Code Here

    }

    public void pickCard(int timeout) {
        if (!killed) {
            setupTimeout(timeout);
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                user.fireCallback(new ClientCallback("draftPick", draft.getId(), new DraftClientMessage(getDraftPickView(timeout))));
            }
        }
    }
View Full Code Here

        }
        return null;
    }

    public void removeDraft() {
        User user = UserManager.getInstance().getUser(userId);
        if (user != null) {
            user.removeDraft(playerId);
        }
    }
View Full Code Here

        this.tableId = tableId;
    }

    public boolean init() {
        if (!killed) {
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                user.fireCallback(new ClientCallback("tournamentInit", tournament.getId(), getTournamentView()));
                return true;
            }
        }
        return false;
    }
View Full Code Here

        return false;
    }

    public void update() {
        if (!killed) {
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                user.fireCallback(new ClientCallback("tournamentUpdate", tournament.getId(), getTournamentView()));
            }
        }
    }
View Full Code Here

        }
    }

    public void gameOver(final String message) {
        if (!killed) {
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                user.fireCallback(new ClientCallback("tournamentOver", tournament.getId(), message));
            }
        }
    }
View Full Code Here

    }

    public void construct(int timeout) {
        if (!killed) {
            setupTimeout(timeout);
            User user = UserManager.getInstance().getUser(userId);
            if (user != null) {
                int remaining = (int) futureTimeout.getDelay(TimeUnit.SECONDS);
                user.construct(tournament.getPlayer(playerId).getDeck(), tableId, remaining);
            }
        }
    }
View Full Code Here

TOP

Related Classes of mage.server.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.