Added 25% xp boost permission (#4773)

This commit is contained in:
Smudge 2022-06-09 22:31:06 +01:00 committed by GitHub
parent d543843235
commit 1a34d2f647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 80 additions and 1 deletions

View File

@ -133,7 +133,12 @@ public final class Permissions {
return permissible.hasPermission("mcmmo.perks.xp.50percentboost.all") return permissible.hasPermission("mcmmo.perks.xp.50percentboost.all")
|| permissible.hasPermission("mcmmo.perks.xp.50percentboost." + skill.toString().toLowerCase(Locale.ENGLISH)); || permissible.hasPermission("mcmmo.perks.xp.50percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
} }
public static boolean oneAndAQuarterXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.25percentboost.all")
|| permissible.hasPermission("mcmmo.perks.xp.25percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));
}
public static boolean oneAndOneTenthXp(Permissible permissible, PrimarySkillType skill) { public static boolean oneAndOneTenthXp(Permissible permissible, PrimarySkillType skill) {
return permissible.hasPermission("mcmmo.perks.xp.10percentboost.all") return permissible.hasPermission("mcmmo.perks.xp.10percentboost.all")
|| permissible.hasPermission("mcmmo.perks.xp.10percentboost." + skill.toString().toLowerCase(Locale.ENGLISH)); || permissible.hasPermission("mcmmo.perks.xp.10percentboost." + skill.toString().toLowerCase(Locale.ENGLISH));

View File

@ -74,6 +74,9 @@ public final class PerksUtils {
else if (Permissions.oneAndOneHalfXp(player, skill)) { else if (Permissions.oneAndOneHalfXp(player, skill)) {
modifier = 1.5; modifier = 1.5;
} }
else if (Permissions.oneAndAQuarterXp(player, skill)) {
modifier = 1.25;
}
else if (Permissions.oneAndOneTenthXp(player, skill)) { else if (Permissions.oneAndOneTenthXp(player, skill)) {
modifier = 1.1; modifier = 1.1;
} }

View File

@ -1495,6 +1495,7 @@ permissions:
children: children:
mcmmo.perks.xp.150percentboost.all: true mcmmo.perks.xp.150percentboost.all: true
mcmmo.perks.xp.50percentboost.all: true mcmmo.perks.xp.50percentboost.all: true
mcmmo.perks.xp.25percentboost.all: true
mcmmo.perks.xp.10percentboost.all: true mcmmo.perks.xp.10percentboost.all: true
mcmmo.perks.xp.customboost.all: true mcmmo.perks.xp.customboost.all: true
mcmmo.perks.xp.double.all: true mcmmo.perks.xp.double.all: true
@ -1640,6 +1641,76 @@ permissions:
mcmmo.perks.xp.50percentboost.woodcutting: mcmmo.perks.xp.50percentboost.woodcutting:
default: false default: false
description: Multiplies incoming Woodcutting XP by 1.5 description: Multiplies incoming Woodcutting XP by 1.5
mcmmo.perks.xp.25percentboost.*:
default: false
description: Multiplies incoming XP by 1.25
children:
mcmmo.perks.xp.25percentboost.all: true
mcmmo.perks.xp.25percentboost:
default: false
description: Multiplies incoming XP by 1.25
children:
mcmmo.perks.xp.25percentboost.all: true
mcmmo.perks.xp.25percentboost.all:
default: false
description: Multiplies incoming XP by 1.25
children:
mcmmo.perks.xp.25percentboost.acrobatics: true
mcmmo.perks.xp.25percentboost.alchemy: true
mcmmo.perks.xp.25percentboost.archery: true
mcmmo.perks.xp.25percentboost.axes: true
mcmmo.perks.xp.25percentboost.excavation: true
mcmmo.perks.xp.25percentboost.fishing: true
mcmmo.perks.xp.25percentboost.herbalism: true
mcmmo.perks.xp.25percentboost.mining: true
mcmmo.perks.xp.25percentboost.repair: true
mcmmo.perks.xp.25percentboost.smelting: true
mcmmo.perks.xp.25percentboost.swords: true
mcmmo.perks.xp.25percentboost.taming: true
mcmmo.perks.xp.25percentboost.unarmed: true
mcmmo.perks.xp.25percentboost.woodcutting: true
mcmmo.perks.xp.25percentboost.acrobatics:
default: false
description: Multiplies incoming Acrobatics XP by 1.25
mcmmo.perks.xp.25percentboost.alchemy:
default: false
description: Multiplies incoming Acrobatics XP by 1.25
mcmmo.perks.xp.25percentboost.archery:
default: false
description: Multiplies incoming Archery XP by 1.25
mcmmo.perks.xp.25percentboost.axes:
default: false
description: Multiplies incoming Axes XP by 1.25
mcmmo.perks.xp.25percentboost.excavation:
default: false
description: Multiplies incoming Excavation XP by 1.25
mcmmo.perks.xp.25percentboost.fishing:
default: false
description: Multiplies incoming Fishing XP by 1.25
mcmmo.perks.xp.25percentboost.herbalism:
default: false
description: Multiplies incoming Herbalism XP by 1.25
mcmmo.perks.xp.25percentboost.mining:
default: false
description: Multiplies incoming Mining XP by 1.25
mcmmo.perks.xp.25percentboost.repair:
default: false
description: Multiplies incoming Repair XP by 1.25
mcmmo.perks.xp.25percentboost.smelting:
default: false
description: Multiplies incoming Smelting XP by 1.25
mcmmo.perks.xp.25percentboost.swords:
default: false
description: Multiplies incoming Swords XP by 1.25
mcmmo.perks.xp.25percentboost.taming:
default: false
description: Multiplies incoming Taming XP by 1.25
mcmmo.perks.xp.25percentboost.unarmed:
default: false
description: Multiplies incoming Unarmed XP by 1.5
mcmmo.perks.xp.25percentboost.woodcutting:
default: false
description: Multiplies incoming Woodcutting XP by 1.25
mcmmo.perks.xp.10percentboost.*: mcmmo.perks.xp.10percentboost.*:
default: false default: false
description: Multiplies incoming XP by 1.1 description: Multiplies incoming XP by 1.1