Examples of PlayersConfig


Examples of com.jcloisterzone.config.Config.PlayersConfig

        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)));
View Full Code Here

Examples of com.jcloisterzone.config.Config.PlayersConfig

    private List<ReservedName> aiNames = new ArrayList<>();
    private List<ReservedName> playerNames = new ArrayList<>();


    public NameProvider(Config config) {
        PlayersConfig playersConfig = config.getPlayers();
        initNames(playerNames, playersConfig == null ? null : playersConfig.getNames());
        initNames(aiNames, playersConfig == null ? null : playersConfig.getAi_names());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.