Package mage.players.net

Examples of mage.players.net.UserData


        this.isAdmin = true;
        User user = UserManager.getInstance().createUser("Admin", host);
        if (user == null) {
            user = UserManager.getInstance().findUser("Admin");
        }
        user.setUserData(new UserData(UserGroup.ADMIN, 0, false, null));
        if (!UserManager.getInstance().connectToSession(sessionId, user.getId())) {
               logger.info("Error connecting Admin!");
        }       
        this.userId = user.getId();
    }
View Full Code Here


    }

    public boolean setUserData(String userName, UserDataView userDataView) {
        User user = UserManager.getInstance().findUser(userName);
        if (user != null) {
            UserData userData = user.getUserData();
            if (userData == null) {
                userData = new UserData(UserGroup.PLAYER, userDataView.getAvatarId(), userDataView.isShowAbilityPickerForced(), userDataView.getUserSkipPrioritySteps());
                user.setUserData(userData);
            } else {
                if (userDataView.getAvatarId() == 51) { // Update special avatar if first avatar is selected
                    updateAvatar(userName, userData);
                }
                userData.setAvatarId(userDataView.getAvatarId());               
                userData.setShowAbilityPickerForced(userDataView.isShowAbilityPickerForced());
                userData.setUserSkipPrioritySteps(userDataView.getUserSkipPrioritySteps());
            }
            return true;
        }
        return false;
    }
View Full Code Here

    private transient List<ColoredManaSymbol> chosenColors;

    public ComputerPlayer(String name, RangeOfInfluence range) {
        super(name, range);
        human = false;
        userData = new UserData(UserGroup.COMPUTER, 64, false, null);
        pickedCards = new ArrayList<>();
    }
View Full Code Here

TOP

Related Classes of mage.players.net.UserData

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.