Examples of WorldConfig


Examples of com.bergerkiller.bukkit.mw.WorldConfig

  }

  public void execute() {
    this.genWorldname(1);
    if (this.handleWorld()) {
      WorldConfig wc = WorldConfig.get(worldname);
        if (args.length == 0) {
          String diff = wc.difficulty.toString().toLowerCase();
          message(ChatColor.YELLOW + "Difficulty of world '" + worldname + "' is set at " + ChatColor.WHITE + diff);
        } else {
          Difficulty diff = Conversion.toDifficulty.convert(args[0]);
          if (diff != null) {
          wc.difficulty = diff;
          wc.updateDifficulty(wc.getWorld());
          message(ChatColor.YELLOW + "Difficulty of world '" + worldname + "' set to " + ChatColor.WHITE + diff.toString().toLowerCase());
          } else {
            message(ChatColor.RED + "Difficulty '" + args[0] + "' has not been recognized!");
          }
        }
View Full Code Here

Examples of com.bergerkiller.bukkit.mw.WorldConfig

        }
      }
    }
    worldname = WorldManager.getWorldName(sender, args, useWorld);
    if (this.handleWorld()) {
      WorldConfig wc = WorldConfig.get(worldname);
      if (time == -1) {
        World w = WorldManager.getWorld(worldname);
        if (w == null) {
          WorldInfo i = wc.getInfo();
          if (i == null) {
            time = 0;
          } else {
            time = i.time;
          }
        } else {
          time = w.getFullTime();
        }
      }
      if (args.length == 0) {
        message(ChatColor.YELLOW + "The current time of world '" +
            worldname + "' is " + TimeUtil.getTimeString(time));
      } else {
        TimeControl tc = wc.timeControl;
        boolean wasLocked = tc.isLocked();
        tc.setLocking(lock);
        tc.setTime(time);
        if (lock) {
          if (wc.isLoaded()) {
            message(ChatColor.GREEN + "Time of world '" + worldname + "' locked to " +
                TimeUtil.getTimeString(time) + "!");
          } else {
            Localization.WORLD_NOTLOADED.message(sender, worldname);
            message(ChatColor.YELLOW + "Time will be locked to " +
                TimeUtil.getTimeString(time) + " as soon it is loaded!");
          }
        } else {
          World w = wc.getWorld();
          if (w != null) {
            if (wasLocked) {
              message(ChatColor.GREEN + "Time of world '" + worldname + "' unlocked and set to " +
                  TimeUtil.getTimeString(time) + "!");
            } else {
View Full Code Here

Examples of com.bergerkiller.bukkit.mw.WorldConfig

          message(msg + ChatColor.YELLOW + mode.name().toLowerCase());
        }
      } else {
        //Parse the gamemode
        GameMode mode = ParseUtil.parseEnum(GameMode.class, args[0], null);
        WorldConfig wc = WorldConfig.get(worldname);
        wc.setGameMode(mode);
        if (mode == null) {
          message(ChatColor.YELLOW + "Game mode of World '" + worldname + "' cleared!");
        } else {
          message(ChatColor.YELLOW + "Game mode of World '" + worldname + "' set to " + mode.name().toLowerCase() + "!");
        }
View Full Code Here

Examples of com.bergerkiller.bukkit.mw.WorldConfig

  }

  public void execute() {
    this.genWorldname(1);
    if (this.handleWorld()) {
      WorldConfig wc = WorldConfig.get(worldname);
      if (args.length == 0) {
        // Display
        if (wc.keepSpawnInMemory) {
          message(ChatColor.GREEN + "The spawn area on World: '" + worldname + "' is kept loaded");
        } else {
          message(ChatColor.YELLOW + "The spawn area on World: '" + worldname + "' is not kept loaded");
        }
      } else {
        // Set
        wc.keepSpawnInMemory = ParseUtil.parseBool(args[0]);
        wc.updateKeepSpawnInMemory(wc.getWorld());
        if (wc.keepSpawnInMemory) {
          message(ChatColor.GREEN + "The spawn area on World: '" + worldname + "' is now kept loaded!");
        } else {
          message(ChatColor.YELLOW + "The spawn area on World: '" + worldname + "' is no longer kept loaded!");
        }
View Full Code Here

Examples of com.bergerkiller.bukkit.mw.WorldConfig

        //Used the last argument as command?
        if (command == args[args.length - 1]) useWorld = false;
      }
      String worldname = WorldManager.getWorldName(sender, args, useWorld);
      if (worldname != null) {
        WorldConfig wc = WorldConfig.get(worldname);
        World w = wc.getWorld();
        if (w != null) {
          boolean holdchange = wc.holdWeather != setHold;
          wc.holdWeather = setHold;
          if (setStorm && ((!w.hasStorm()) || (setThunder && !w.isThundering()) || holdchange)) {
            MyWorlds.plugin.setWeather(w, true);
View Full Code Here

Examples of com.bergerkiller.bukkit.mw.WorldConfig

  public void execute() {
    if (args.length != 0) {
      this.genWorldname(1);
      if (this.handleWorld()) {
        WorldConfig wc = WorldConfig.get(worldname);
        if (ParseUtil.isBool(args[0])) {
          wc.formIce = ParseUtil.parseBool(args[0]);
          if (wc.formIce) {
            message(ChatColor.YELLOW + "Ice will now form on world '" + worldname + "'!");
          } else {
View Full Code Here

Examples of com.bergerkiller.bukkit.mw.WorldConfig

 
  public void execute() {
    if (args.length != 0) {
      this.genWorldname(1);
      if (this.handleWorld()) {
        WorldConfig wc = WorldConfig.get(worldname);
        if (ParseUtil.isBool(args[0])) {
          wc.reloadWhenEmpty = ParseUtil.parseBool(args[0]);
          if (wc.reloadWhenEmpty) {
            message(ChatColor.YELLOW + "The world '" + worldname + "' will now reload when it has no players.");
          } else {
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WorldConfig

        }

        BiomeConfig biomeConfig = biome.getBiomeConfig();

        // Get the random generator
        WorldConfig worldConfig = configProvider.getWorldConfig();
        long resourcesSeed = worldConfig.resourcesSeed != 0L ? worldConfig.resourcesSeed : world.getSeed();
        this.rand.setSeed(resourcesSeed);
        long l1 = this.rand.nextLong() / 2L * 2L + 1L;
        long l2 = this.rand.nextLong() / 2L * 2L + 1L;
        this.rand.setSeed(chunkCoord.getChunkX() * l1 + chunkCoord.getChunkZ() * l2 ^ resourcesSeed);
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WorldConfig

     */
    protected void calculateBiomeModes(Iterable<? extends LocalWorld> worlds)
    {
        for (LocalWorld world : worlds)
        {
            WorldConfig config = world.getConfigs().getWorldConfig();
            if (config != null)
            {
                Class<? extends BiomeGenerator> clazz = config.biomeMode;
                if (clazz.equals(NormalBiomeGenerator.class))
                {
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.WorldConfig

        this.noiseGen6 = new NoiseGeneratorPerlinOctaves(this.random, 16);

        this.caveGen = new CavesGen(configs.getWorldConfig(), this.localWorld);
        this.canyonGen = new CanyonsGen(configs.getWorldConfig(), this.localWorld);

        WorldConfig worldConfig = configs.getWorldConfig();

        // Contains 2d array maxSmoothDiameter*maxSmoothDiameter.
        // Maximum weight is in array center.

        this.maxSmoothDiameter = worldConfig.maxSmoothRadius * 2 + 1;
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.