Unstable Build: Attempts to add max-players option to config for parties. This value can be between 2-8.

This commit is contained in:
Ethan 2021-02-12 12:05:12 -05:00
parent fcf26df82e
commit 422730e472
2 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,7 @@ public class PartyInvite extends Request {
}
public void accept() {
if(party.getMembers().count() >= 4) {
if(party.getMembers().count() >= Math.min(8, Math.max(2, MMOCore.plugin.getConfig().getInt("party.max-players", 8)))) {
MMOCore.plugin.configManager.getSimpleMessage("party-is-full").send(target.getPlayer());
return;
}

View File

@ -102,6 +102,10 @@ party:
# to talk in the party chat.
chat-prefix: '@'
# The max players that can be in
# any given party. Between 2-8.
max-players: 8
# Redirects vanilla experience obtained to MMOCore
# class experience. You can define the % of the vanilla
# experience that is being transfered as MMOCore exp.