Package org.bukkit

Examples of org.bukkit.World


      for (MinecartMember<?> member : owner) {
        member.getBlockTracker().liveActiveSigns.clear();
      }

      // Add all active signs to the block tracker of all members
      World world = owner.getWorld();
      for (Entry<IntVector3, MinecartMember<?>> entry : blockSpace.entrySet()) {
        IntVector3 pos = entry.getKey();
        for (RailType type : RailType.values()) {
          if (type.isRail(world, pos.x, pos.y, pos.z)) {
            Block block = pos.toBlock(world);
View Full Code Here


    return list;
  }
 
  public static DetectorRegion create(Collection<Block> blocks) {
    if (blocks.isEmpty()) return null;
    World world = null;
    Set<IntVector3> coords = new HashSet<IntVector3>(blocks.size());
    for (Block b : blocks) {
      if (world == null) {
        world = b.getWorld();
      } else if (world != b.getWorld()) {
View Full Code Here

        regions.put(world, coord, list);
      }
      list.add(this);
    }
    //load members
    World w = Bukkit.getServer().getWorld(this.world);
    if (w != null) {
      for (IntVector3 coord : this.coordinates) {
        MinecartMember<?> mm = MinecartMemberStore.getAt(w, coord);
        if (mm != null && this.members.add(mm)) {
          this.onEnter(mm);
View Full Code Here

    OfflineGroup group = OfflineGroupManager.findGroup(this.trainname);
    if (group == null) {
      TrainProperties.remove(getTrainName());
      return false;
    }
    World world = Bukkit.getWorld(group.worldUUID);
    if (world != null) {
      for (long chunk : group.chunks) {
        world.getChunkAt(MathUtil.longHashMsw(chunk), MathUtil.longHashLsw(chunk));
      }
    }
    return this.hasHolder();
  }
View Full Code Here

  public static Block findRailsVertical(Block from, BlockFace mode) {
    int sy = from.getY();
    int x = from.getX();
    int z = from.getZ();
    World world = from.getWorld();
    if (mode == BlockFace.DOWN) {
      for (int y = sy - 1; y > 0; --y) {
        if (ISTCRAIL.get(world, x, y, z)) {
          return world.getBlockAt(x, y, z);
        }
      }
    } else if (mode == BlockFace.UP) {
      int height = world.getMaxHeight();
      for (int y = sy + 1; y < height; y++) {
        if (ISTCRAIL.get(world, x, y, z)) {
          return world.getBlockAt(x, y, z);
        }
      }
    }
    return null;
  }
View Full Code Here

        int count = OfflineGroupManager.destroyAll();
        sender.sendMessage(ChatColor.RED.toString() + count + " (visible) trains have been destroyed!")
      } else {
        // Destroy the trains on a single world
        String cname = args[1].toLowerCase();
        World w = Bukkit.getWorld(cname);
        if (w == null) {
          for (World world : Bukkit.getServer().getWorlds()) {
            if (world.getName().toLowerCase().contains(cname)) {
              w = world;
              break;
View Full Code Here

      Permission.COMMAND_TELEPORT.handle(p);
      if (!prop.restore()) {
        p.sendMessage(ChatColor.RED + "Train location could not be found: Train is lost");
      } else {
        BlockLocation bloc = prop.getLocation();
        World world = bloc.getWorld();
        if (world == null) {
          p.sendMessage(ChatColor.RED + "Train is on a world that is not loaded (" + bloc.world + ")");
        } else {
          EntityUtil.teleport(p, new Location(world, bloc.x + 0.5, bloc.y + 0.5, bloc.z + 0.5));
        }
View Full Code Here

      Permission.COMMAND_TELEPORT.handle(p);
      if (!prop.restore()) {
        p.sendMessage(ChatColor.RED + "Cart location could not be found: Cart is lost");
      } else {
        BlockLocation bloc = prop.getLocation();
        World world = bloc.getWorld();
        if (world == null) {
          p.sendMessage(ChatColor.RED + "Cart is on a world that is not loaded (" + bloc.world + ")");
        } else {
          EntityUtil.teleport(p, new Location(world, bloc.x + 0.5, bloc.y + 0.5, bloc.z + 0.5));
        }
View Full Code Here

        dB.report(scriptEntry, getName(), World_Name.debug() +
                                          (Generator != null ? Generator.debug(): "") +
                                          worldType.debug());

        World world;

        if (Generator != null)
            world = Bukkit.getServer().createWorld(WorldCreator
                    .name(World_Name.asString())
                    .generator(Generator.asString())
View Full Code Here

                this.point_2 = point;
            regenerate();
        }

        public void regenerate() {
            World world = point_1.getWorld();

            // Find the low and high locations based on the points
            // specified
            int x_high = (point_1.getBlockX() >= point_2.getBlockX()
                    ? point_1.getBlockX() : point_2.getBlockX());
View Full Code Here

TOP

Related Classes of org.bukkit.World

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.