Package com.gmail.nossr50.datatypes.player

Examples of com.gmail.nossr50.datatypes.player.PlayerProfile.addXp()


        if (isCancelled) {
            PlayerProfile profile = UserManager.getPlayer(player).getProfile();

            profile.modifySkill(skill, profile.getSkillLevel(skill) - (isLevelUp ? levelsChanged : -levelsChanged));
            profile.addXp(skill, xpRemoved);
        }

        return !isCancelled;
    }
View Full Code Here


    // Utility methods follow.
    private static void addOfflineXP(UUID playerUniqueId, SkillType skill, int XP) {
        PlayerProfile profile = getOfflineProfile(playerUniqueId);

        profile.addXp(skill, XP);
        profile.save();
    }

    @Deprecated
    private static void addOfflineXP(String playerName, SkillType skill, int XP) {
View Full Code Here

    @Deprecated
    private static void addOfflineXP(String playerName, SkillType skill, int XP) {
        PlayerProfile profile = getOfflineProfile(playerName);

        profile.addXp(skill, XP);
        profile.scheduleAsyncSave();
    }

    private static PlayerProfile getOfflineProfile(UUID uuid) {
        PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(uuid);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.