Package org.spout.vanilla.data.configuration

Examples of org.spout.vanilla.data.configuration.WorldConfigurationNode


    }
  }

  @EventHandler (order = Order.EARLIEST)
  public void onEntitySpawn(EntitySpawnEvent event) {
    WorldConfigurationNode node = VanillaConfiguration.WORLDS.get(event.getEntity().getWorld());
    Living mob = event.getEntity().get(Living.class);
    if (!(mob instanceof Player)) {
      if (!node.SPAWN_ANIMALS.getBoolean()) {
        if (mob instanceof Neutral || mob instanceof Passive) {
          event.setCancelled(true);
View Full Code Here


    return getData().get(VanillaData.VIEW_DISTANCE);
  }

  public void setViewDistance(ViewDistance distance) {
    getData().put(VanillaData.VIEW_DISTANCE, distance);
    WorldConfigurationNode config = VanillaConfiguration.WORLDS.get(getOwner().getWorld().getName());
    int viewDistance;
    switch (distance) {
      case FAR:
        viewDistance = config.FAR_VIEW_DISTANCE.getInt();
        break;
View Full Code Here

    getEngine().getServiceManager().register(ProtectionService.class, new VanillaProtectionService(), this, ServiceManager.ServicePriority.Highest);

    for (World world : worlds) {

      // Keep spawn loaded
      WorldConfigurationNode worldConfig = VanillaConfiguration.WORLDS.get(world);
      final WorldGenerator generator = world.getGenerator();
      boolean newWorld = world.getAge() <= 0;

      if (worldConfig.LOADED_SPAWN.getBoolean() || newWorld) {
View Full Code Here

  /**
   * Sent as the initial login process if first is true, otherwise handled as a normal world change.
   */
  private void worldChanged(World world) {
    // TODO: this needs to be re-written to either be only about world-changes, or to handle first connection completely in the if statement.
    WorldConfigurationNode node = VanillaConfiguration.WORLDS.get(world);
    maxY = node.MAX_Y.getInt() & (~Chunk.BLOCKS.MASK);
    minY = node.MIN_Y.getInt() & (~Chunk.BLOCKS.MASK);
    stepY = node.STEP_Y.getInt() & (~Chunk.BLOCKS.MASK);
    lastY = Integer.MAX_VALUE;

View Full Code Here

TOP

Related Classes of org.spout.vanilla.data.configuration.WorldConfigurationNode

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.