Added an option for profession exp splitting

This commit is contained in:
Indyuce 2022-07-07 01:02:26 +02:00
parent e84fe13e57
commit c84b30bc6d
3 changed files with 6 additions and 2 deletions

View File

@ -169,7 +169,7 @@ public class PlayerProfessions {
// Splitting exp through party members
AbstractParty party;
if (splitExp && (party = playerData.getParty()) != null) {
if (splitExp && (party = playerData.getParty()) != null && MMOCore.plugin.configManager.splitProfessionExp) {
List<PlayerData> onlineMembers = party.getOnlineMembers();
value /= onlineMembers.size();
for (PlayerData member : onlineMembers)

View File

@ -23,7 +23,7 @@ import java.util.logging.Level;
public class ConfigManager {
public final CommandVerbose commandVerbose = new CommandVerbose();
public boolean overrideVanillaExp, canCreativeCast, cobbleGeneratorXP, saveDefaultClassInfo, attributesAsClassInfo;
public boolean overrideVanillaExp, canCreativeCast, cobbleGeneratorXP, saveDefaultClassInfo, attributesAsClassInfo, splitProfessionExp;
public String partyChatPrefix, noSkillBoundPlaceholder;
public ChatColor staminaFull, staminaHalf, staminaEmpty;
public long combatLogTimer, lootChestExpireTime, lootChestPlayerCooldown, globalSkillCooldown;
@ -102,6 +102,7 @@ public class ConfigManager {
lootChestsChanceWeight = MMOCore.plugin.getConfig().getDouble("chance-stat-weight.loot-chests");
fishingDropsChanceWeight = MMOCore.plugin.getConfig().getDouble("chance-stat-weight.fishing-drops");
maxPartyLevelDifference = MMOCore.plugin.getConfig().getInt("party.max-level-difference");
splitProfessionExp = MMOCore.plugin.getConfig().getBoolean("party.profession-exp-split");
staminaFull = getColorOrDefault("stamina-whole", ChatColor.GREEN);
staminaHalf = getColorOrDefault("stamina-half", ChatColor.DARK_GREEN);

View File

@ -159,6 +159,9 @@ party:
# that feature.
max-level-difference: 3
# When enabled, being in a party also splits profession exp
profession-exp-split: false
# Redirects vanilla experience obtained to MMOCore
# class experience. You can define the % of the vanilla
# experience that is being transfered as MMOCore exp.