use of com.gmail.nossr50.datatypes.skills.SkillType 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);
}
use of com.gmail.nossr50.datatypes.skills.SkillType 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);
}
use of com.gmail.nossr50.datatypes.skills.SkillType 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);
}
use of com.gmail.nossr50.datatypes.skills.SkillType 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);
}
use of com.gmail.nossr50.datatypes.skills.SkillType in project TriggerReactor by wysohn.
the class McMmoSupport method addLevel.
/**
* add 'levels' to target player's 'skillType'
*
* @param player
* @param skillType
* @param levels
*/
public void addLevel(Player player, String skillType, int levels) {
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.addLevels(type, levels);
}
Aggregations