model.put("client_name", config.getClient_name());
if (config.getConfirm() != null) {
model.put("confirm", indent(1, yaml.dumpAs(config.getConfirm(), Tag.MAP, FlowStyle.BLOCK)));
}
PlayersConfig pc = config.getPlayers();
if (pc != null) {
if (pc.getColors() != null && !pc.getColors().isEmpty()) {
StringBuilder colors = new StringBuilder();
for (ColorConfig cfg : pc.getColors()) {
colors.append("\n - ");
colors.append(yaml.dumpAs(cfg, Tag.MAP, FlowStyle.FLOW).trim());
}
model.put("colors", colors.toString());
}
if (pc.getNames() != null && !pc.getNames().isEmpty()) {
model.put("player_names", yaml.dumpAs(pc.getNames(), Tag.SEQ, FlowStyle.FLOW).trim());
}
if (pc.getAi_names() != null && !pc.getAi_names().isEmpty()) {
model.put("ai_names", yaml.dumpAs(pc.getAi_names(), Tag.SEQ, FlowStyle.FLOW).trim());
}
}
if (config.getPlugins() != null && !config.getPlugins().isEmpty()) {
model.put("plugins", indent(1, yaml.dumpAs(config.getPlugins(), Tag.SEQ, FlowStyle.BLOCK)));