diff --git a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java index 5b4cd20d0..516416cb2 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java @@ -1002,7 +1002,7 @@ public class PlayerProfile { } /** - * Adds XP to the player, this is affected by skill modifiers and XP Rate + * Adds XP to the player, this is affected by skill modifiers and XP Rate and Permissions * * @param player The player to add XP to * @param skillType The skill to add XP to @@ -1039,6 +1039,14 @@ public class PlayerProfile { xp = (int) (xp * tool.getXpMultiplier()); } } + + 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.double")) { + xp = xp * 2; + } mcMMO.p.getServer().getPluginManager().callEvent(new McMMOPlayerXpGainEvent(player, skillType, xp)); skillsXp.put(skillType, skillsXp.get(skillType) + xp); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 13c27db44..0ce068333 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -137,7 +137,23 @@ permissions: mcmmo.admin: true mcmmo.tools.*: true mcmmo.admin: - description: Allows access to mmoupdate and other sensitive commands + description: Allows access to mmoupdate and other sensitive commands + mcmmo.perks.xp: + default: false + description: XP Perks typically given to donors or VIPs + children: + mcmmo.perks.xp.quadruple; + mcmmo.perks.xp.triple; + mcmmo.perks.xp.double; + mcmmo.perks.xp.quadruple: + default: false + description: Quadruples incoming XP + mcmmo.perks.xp.triple: + default: false + description: Triples incoming XP + mcmmo.perks.xp.double + default: false + description: Doubles incoming XP mcmmo.bypass.*: default: false description: Implies all bypass permissions.