Restructured the config file in preperation for server run modes

This commit is contained in:
Benjamin Elsdon
2022-04-21 13:53:50 +08:00
parent 74bce2fe18
commit 83fe5818dc
14 changed files with 77 additions and 71 deletions

View File

@@ -164,13 +164,13 @@ public class TeamManager {
public int getMaxTeamSize() {
if (getPlayer().isInMultiplayer()) {
int max = Grasscutter.getConfig().getServerOptions().MaxAvatarsInTeamMultiplayer;
int max = Grasscutter.getConfig().getGameServerOptions().MaxAvatarsInTeamMultiplayer;
if (getPlayer().getWorld().getHost() == this.getPlayer()) {
return Math.max(1, (int) Math.ceil(max / (double) getWorld().getPlayerCount()));
}
return Math.max(1, (int) Math.floor(max / (double) getWorld().getPlayerCount()));
}
return Grasscutter.getConfig().getServerOptions().MaxAvatarsInTeam;
return Grasscutter.getConfig().getGameServerOptions().MaxAvatarsInTeam;
}
// Methods