mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-28 11:37:39 +01:00
Added permissions that will grant users 4x 3x or 2x XP
This commit is contained in:
parent
92acf62884
commit
e599ab9214
@ -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 player The player to add XP to
|
||||||
* @param skillType The skill to add XP to
|
* @param skillType The skill to add XP to
|
||||||
@ -1040,6 +1040,14 @@ public class PlayerProfile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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));
|
mcMMO.p.getServer().getPluginManager().callEvent(new McMMOPlayerXpGainEvent(player, skillType, xp));
|
||||||
skillsXp.put(skillType, skillsXp.get(skillType) + xp);
|
skillsXp.put(skillType, skillsXp.get(skillType) + xp);
|
||||||
lastgained = skillType;
|
lastgained = skillType;
|
||||||
|
@ -138,6 +138,22 @@ permissions:
|
|||||||
mcmmo.tools.*: true
|
mcmmo.tools.*: true
|
||||||
mcmmo.admin:
|
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.*:
|
mcmmo.bypass.*:
|
||||||
default: false
|
default: false
|
||||||
description: Implies all bypass permissions.
|
description: Implies all bypass permissions.
|
||||||
|
Loading…
Reference in New Issue
Block a user