mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed Xp not being awarded in parties because of XpShareMode.NONE
This commit is contained in:
parent
5801981147
commit
bd3db4a425
@ -43,7 +43,8 @@ public final class ShareHandler {
|
|||||||
running = true;
|
running = true;
|
||||||
Party party = mcMMOPlayer.getParty();
|
Party party = mcMMOPlayer.getParty();
|
||||||
|
|
||||||
if (party.getXpShareMode() == XpShareMode.EQUAL) {
|
switch (party.getXpShareMode()) {
|
||||||
|
case EQUAL:
|
||||||
Player player = mcMMOPlayer.getPlayer();
|
Player player = mcMMOPlayer.getPlayer();
|
||||||
List<Player> nearMembers = PartyManager.getNearMembers(player, party, Config.getInstance().getPartyShareRange());
|
List<Player> nearMembers = PartyManager.getNearMembers(player, party, Config.getInstance().getPartyShareRange());
|
||||||
|
|
||||||
@ -61,10 +62,14 @@ public final class ShareHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mcMMOPlayer.addXp(skillType, roundedXp);
|
mcMMOPlayer.addXp(skillType, roundedXp);
|
||||||
}
|
|
||||||
|
|
||||||
running = false;
|
running = false;
|
||||||
return true;
|
return true;
|
||||||
|
case NONE:
|
||||||
|
default:
|
||||||
|
running = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isRunning() {
|
public static boolean isRunning() {
|
||||||
|
Loading…
Reference in New Issue
Block a user