mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
More party members = more XP share bonus
Sorry, broke your party settings in config.yml. So now when there are more party members near, the party share bonus is increased. :)
This commit is contained in:
@ -84,7 +84,9 @@ public class Config extends ConfigLoader {
|
||||
|
||||
/* PARTY SETTINGS */
|
||||
public boolean getExpShareEnabled() { return config.getBoolean("Party.Sharing.ExpShare_enabled", true); }
|
||||
public double getPartyShareBonus() { return config.getDouble("Party.Sharing.ExpShare_bonus", 1.1); }
|
||||
public double getPartyShareBonusBase() { return config.getDouble("Party.Sharing.ExpShare_bonus_base", 1.1); }
|
||||
public double getPartyShareBonusIncrease() { return config.getDouble("Party.Sharing.ExpShare_bonus_increase", 0.05); }
|
||||
public double getPartyShareBonusCap() { return config.getDouble("Party.Sharing.ExpShare_bonus_cap", 1.5); }
|
||||
public boolean getItemShareEnabled() { return config.getBoolean("Party.Sharing.ItemShare_enabled", true); }
|
||||
public double getPartyShareRange() { return config.getDouble("Party.Sharing.Range", 75.0); }
|
||||
|
||||
|
@ -50,7 +50,11 @@ public final class ShareHandler {
|
||||
}
|
||||
|
||||
double partySize = nearMembers.size() + 1;
|
||||
double splitXp = xp / partySize * Config.getInstance().getPartyShareBonus();
|
||||
double shareBonus = Config.getInstance().getPartyShareBonusBase() + partySize * Config.getInstance().getPartyShareBonusIncrease();
|
||||
if (shareBonus > Config.getInstance().getPartyShareBonusCap()) {
|
||||
shareBonus = Config.getInstance().getPartyShareBonusCap();
|
||||
}
|
||||
double splitXp = xp / partySize * shareBonus;
|
||||
int roundedXp = (int) Math.ceil(splitXp);
|
||||
|
||||
for (Player member : nearMembers) {
|
||||
|
Reference in New Issue
Block a user