Search in sources :

Example 6 with McMMOPlayer

use of com.gmail.nossr50.datatypes.player.McMMOPlayer in project TriggerReactor by wysohn.

the class McMmoSupport method xp.

/**
 * get current xp of player's 'skillType'
 *
 * @param player
 * @param skillType
 * @return
 */
public double xp(Player player, String skillType) {
    McMMOPlayer mmoPlayer = (McMMOPlayer) player(player.getName());
    if (mmoPlayer == null)
        throw new RuntimeException("Could not find MCMMO info for player " + player.getName());
    SkillType type = SkillType.valueOf(skillType);
    return mmoPlayer.getSkillXpLevelRaw(type);
}
Also used : McMMOPlayer(com.gmail.nossr50.datatypes.player.McMMOPlayer) SkillType(com.gmail.nossr50.datatypes.skills.SkillType)

Example 7 with McMMOPlayer

use of com.gmail.nossr50.datatypes.player.McMMOPlayer in project TriggerReactor by wysohn.

the class McMmoSupport method addXp.

/**
 * add 'xp' to the target player's 'skillType'
 *
 * @param player
 * @param skillType
 * @param xp
 */
public void addXp(Player player, String skillType, int xp) {
    McMMOPlayer mmoPlayer = (McMMOPlayer) player(player.getName());
    if (mmoPlayer == null)
        throw new RuntimeException("Could not find MCMMO info for player " + player.getName());
    SkillType type = SkillType.valueOf(skillType);
    mmoPlayer.addXp(type, xp);
}
Also used : McMMOPlayer(com.gmail.nossr50.datatypes.player.McMMOPlayer) SkillType(com.gmail.nossr50.datatypes.skills.SkillType)

Example 8 with McMMOPlayer

use of com.gmail.nossr50.datatypes.player.McMMOPlayer in project TriggerReactor by wysohn.

the class McMmoSupport method level.

/**
 * get current level of player's 'skillType'
 *
 * @param player
 * @param skillType
 * @return
 */
public int level(Player player, String skillType) {
    McMMOPlayer mmoPlayer = (McMMOPlayer) player(player.getName());
    if (mmoPlayer == null)
        throw new RuntimeException("Could not find MCMMO info for player " + player.getName());
    SkillType type = SkillType.valueOf(skillType);
    return mmoPlayer.getSkillLevel(type);
}
Also used : McMMOPlayer(com.gmail.nossr50.datatypes.player.McMMOPlayer) SkillType(com.gmail.nossr50.datatypes.skills.SkillType)

Example 9 with McMMOPlayer

use of com.gmail.nossr50.datatypes.player.McMMOPlayer in project TriggerReactor by wysohn.

the class McMmoSupport method xpRemain.

/**
 * get xp left until level up of 'skillType' for player.
 *
 * @param player
 * @param skillType
 * @return
 */
public double xpRemain(Player player, String skillType) {
    McMMOPlayer mmoPlayer = (McMMOPlayer) player(player.getName());
    if (mmoPlayer == null)
        throw new RuntimeException("Could not find MCMMO info for player " + player.getName());
    SkillType type = SkillType.valueOf(skillType);
    return mmoPlayer.getXpToLevel(type);
}
Also used : McMMOPlayer(com.gmail.nossr50.datatypes.player.McMMOPlayer) SkillType(com.gmail.nossr50.datatypes.skills.SkillType)

Example 10 with McMMOPlayer

use of com.gmail.nossr50.datatypes.player.McMMOPlayer in project TriggerReactor by wysohn.

the class McMmoSupport method cooldown.

/**
 * get cooltime of player's 'abilityType'
 *
 * @param player
 * @param abilityType
 * @return
 */
public int cooldown(Player player, String abilityType) {
    McMMOPlayer mmoPlayer = (McMMOPlayer) player(player.getName());
    if (mmoPlayer == null)
        throw new RuntimeException("Could not find MCMMO info for player " + player.getName());
    AbilityType type = AbilityType.valueOf(abilityType);
    return mmoPlayer.calculateTimeRemaining(type);
}
Also used : AbilityType(com.gmail.nossr50.datatypes.skills.AbilityType) McMMOPlayer(com.gmail.nossr50.datatypes.player.McMMOPlayer)

Aggregations

McMMOPlayer (com.gmail.nossr50.datatypes.player.McMMOPlayer)14 SkillType (com.gmail.nossr50.datatypes.skills.SkillType)7 BankerService (gg.projecteden.nexus.models.banker.BankerService)3 McMMOPrestige (gg.projecteden.nexus.models.mcmmo.McMMOPrestige)3 Party (com.gmail.nossr50.datatypes.party.Party)2 PrimarySkillType (com.gmail.nossr50.datatypes.skills.PrimarySkillType)2 Player (org.bukkit.entity.Player)2 ChatChannel (com.gmail.nossr50.datatypes.chat.ChatChannel)1 AbilityType (com.gmail.nossr50.datatypes.skills.AbilityType)1 UserManager (com.gmail.nossr50.util.player.UserManager)1 Tristate (com.griefdefender.api.Tristate)1 Claim (com.griefdefender.api.claim.Claim)1 PlayerData (com.griefdefender.api.data.PlayerData)1 Context (com.griefdefender.api.permission.Context)1 Koda (gg.projecteden.nexus.features.chat.Koda)1 GemCommand (gg.projecteden.nexus.features.crates.GemCommand)1 TIER_ONE (gg.projecteden.nexus.features.mcmmo.McMMO.TIER_ONE)1 TIER_ONE_ALL (gg.projecteden.nexus.features.mcmmo.McMMO.TIER_ONE_ALL)1 TIER_TWO (gg.projecteden.nexus.features.mcmmo.McMMO.TIER_TWO)1 ConfirmationMenu (gg.projecteden.nexus.features.menus.MenuUtils.ConfirmationMenu)1