Package net.canarymod.config

Examples of net.canarymod.config.WorldConfiguration


    private boolean createServerProperties(String worldname) {

        PropertiesFile props = new PropertiesFile("vanilla/server.properties");

        ServerConfiguration server = Configuration.getServerConfig();
        WorldConfiguration world = Configuration.getWorldConfig(worldname);

        props.setBoolean("allow-flight", world.isFlightAllowed());
        props.setBoolean("allow-nether", world.isNetherAllowed());
        props.setInt("difficulty", world.getDifficulty().getId());
        props.setBoolean("enable-query", server.isQueryEnabled());
        props.setBoolean("enable-rcon", server.isRconEnabled());
        props.setInt("gamemode", world.getGameMode().getId());
        props.setBoolean("generate-structures", world.generatesStructures());
        props.setString("level-name", world.getWorldName());
        props.setString("level-seed", world.getWorldSeed());
        props.setString("level-type", world.getWorldType().toString());
        props.setInt("max-build-height", world.getMaxBuildHeight());
        props.setInt("max-players", server.getMaxPlayers());
        props.setString("motd", server.getMotd());
        props.setBoolean("online-mode", server.isOnlineMode());
        props.setBoolean("pvp", world.isPvpEnabled());
        props.setInt("query.port", server.getQueryPort());
        props.setString("rcon.password", server.getRconPassword());
        props.setInt("rcon.port", server.getRconPort());
        props.setString("server-ip", server.getBindIp());
        props.setInt("server-port", server.getPort());
        props.setBoolean("spawn-animals", world.canSpawnAnimals());
        props.setBoolean("spawn-monsters", world.canSpawnMonsters());
        props.setBoolean("spawn-npcs", world.canSpawnVillagers());
        props.setInt("view-distance", server.getViewDistance());
        props.setBoolean("white-list", false);

        props.save();
View Full Code Here

TOP

Related Classes of net.canarymod.config.WorldConfiguration

Copyright © 2018 www.massapicom. 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.