Add more XP boost permissions nodes.

This commit is contained in:
GJ 2012-06-27 08:31:10 -04:00
parent 24d2c1bc7a
commit 0e85b4776a
3 changed files with 17 additions and 1 deletions

View File

@ -11,6 +11,7 @@ Version 1.3.10-dev
+ Added permission node for Iron Grip ability (mcmmo.ability.unarmed.irongrip)
+ Added ability for custom blocks to drop a range of items.
+ Added Ability API functions
+ Added 50% & 150% XP boost perks
= Fixed players never being removed from memory (memory leak)
= Fixed admin chat being seen by everyone
= Fixed issue with UTFDataFormatException occurring on occasion when trying to load Chunklets

View File

@ -1014,15 +1014,22 @@ public class PlayerProfile {
}
}
//TODO: Can we make this so we do perks by doing "mcmmo.perks.xp.[multiplier]" ?
if (player.hasPermission("mcmmo.perks.xp.quadruple")) {
xp = xp * 4;
}
else if (player.hasPermission("mcmmo.perks.xp.triple")) {
xp = xp * 3;
}
else if (player.hasPermission("mcmmo.perks.xp.150percentboost")) {
xp = (int) (xp * 2.5);
}
else if (player.hasPermission("mcmmo.perks.xp.double")) {
xp = xp * 2;
}
else if (player.hasPermission("mcmmo.perks.xp.50percentboost")) {
xp = (int) (xp * 1.5);
}
mcMMO.p.getServer().getPluginManager().callEvent(new McMMOPlayerXpGainEvent(player, skillType, xp));
skillsXp.put(skillType, skillsXp.get(skillType) + xp);

View File

@ -176,16 +176,24 @@ permissions:
children:
mcmmo.perks.xp.quadruple: true
mcmmo.perks.xp.triple: true
mcmmo.perks.xp.150percentboost: true
mcmmo.perks.xp.double: true
mcmmo.perks.xp.50percentboost: true
mcmmo.perks.xp.quadruple:
default: false
description: Quadruples incoming XP
mcmmo.perks.xp.triple:
default: false
description: Triples incoming XP
mcmmo.perks.xp.150percentboost:
default: false
description: Mulitplies incoming XP by 2.5
mcmmo.perks.xp.double:
default: false
description: Doubles incoming XP
mcmmo.perks.xp.50percentboost:
default: false
description: Mulitplies incoming XP by 1.5
mcmmo.bypass.*:
default: false
description: Implies all bypass permissions.