Package org.bukkit

Examples of org.bukkit.World


                    z = Double.parseDouble(parts[2]);
                    break;
                default:
                    throw new CommandException("Location could not be parsed or was not found.");
            }
            World world = Bukkit.getWorld(worldName);
            if (world == null)
                throw new CommandException("Location could not be parsed or was not found.");
            return new Location(world, x, y, z, yaw, pitch);
        } else {
            Player search = Bukkit.getPlayerExact(flag);
View Full Code Here


                rotation.e(1)
        );
    }

    public void setLocation(Location location) {
        World w = location.getWorld();
        UUID uuid = w.getUID();
        this.compound.setLong("WorldUUIDMost", uuid.getMostSignificantBits());
        this.compound.setLong("WorldUUIDLeast", uuid.getLeastSignificantBits());
        this.compound.setInt("Dimension", w.getEnvironment().ordinal());
        NBTTagList position = new NBTTagList();
        position.add(new NBTTagDouble(location.getX()));
        position.add(new NBTTagDouble(location.getY()));
        position.add(new NBTTagDouble(location.getZ()));
        this.compound.set("Pos", position);
View Full Code Here

        SimpleClans.getInstance().getStorageManager().updateClan(this);
    }

    public Location getHomeLocation()
    {
        World world = SimpleClans.getInstance().getServer().getWorld(homeWorld);

        if (world != null)
        {
            if (!(world.getBlockAt(homeX, homeY, homeZ).getType().equals(Material.AIR)) || !(world.getBlockAt(homeX, homeY + 1, homeZ).getType().equals(Material.AIR)) || homeY == 0)
            {
                return new Location(world, homeX, world.getHighestBlockYAt(homeX, homeZ), homeZ);
            }
            else
            {
                return new Location(world, homeX, homeY, homeZ);
            }
View Full Code Here

        remainingFrames = restorationFile.readInt();
        int x = restorationFile.readInt();
        int y = restorationFile.readInt();
        int z = restorationFile.readInt();
        String worldName = restorationFile.readUTF();
        World world = Bukkit.getWorld(worldName);
        if (world == null)
        {
          throw new IllegalStateException("there is no such world as \"" + worldName + "\"");
        }
        offset = new Location(world, x, y, z);
View Full Code Here

      if(pos1 == null || pos2 == null)
      {
        sender.sendMessage("Positions were not set. cant continue");
        return true;
      }
      World w = pos1.getWorld();
      if(args.length != 1 && args.length != 2){
        return false;
      }
      if(pos1.getWorld() != pos2.getWorld()){
        sender.sendMessage("both positions have to be in the same world");
        return true;
      }
      new CinemaSaver(args, w, sender, false, savePath, pos1, pos2).start();
      return true;
    }
    //csavedelta file index
    else if(cmd.getName().equalsIgnoreCase("csavedelta")){
      if(pos1 == null || pos2 == null)
      {
        sender.sendMessage("Positions were not set. cant continue");
        return true;
      }
      World w = pos1.getWorld();
      if(args.length != 1 && args.length != 2){
        return false;
      }
      if(pos1.getWorld() != pos2.getWorld()){
        sender.sendMessage("both positions have to be in the same world");
View Full Code Here

 
  //delta if previousFrame not null
  public Frame(Region region, Frame previousFrame) {
    int nowx,nowy,nowz;
    Location pos1 = region.getPos1();
    World world = pos1.getWorld();
    boolean delta = previousFrame != null;
    for(int xx = region.getMinX();xx<=region.getMaxX();xx++){
      for(int yy =region.getMinY();yy<=region.getMaxY();yy++){
        for(int zz = region.getMinZ();zz<=region.getMaxZ();zz++){
          nowx = xx-pos1.getBlockX();
          nowy = yy-pos1.getBlockY();
          nowz = zz-pos1.getBlockZ();
          Block b = world.getBlockAt(xx, yy, zz);
          CBlock cb = new CBlock(b, new Vector3Int(nowx,nowy,nowz));
          if(delta){
            if(!cb.equals(previousFrame.getBlock(cb.getPosition()))){
              //add
              addBlock(cb);
View Full Code Here

      boolean oneSet = raf.readBoolean();
      if(oneSet){
        int x = raf.readInt();
        int y = raf.readInt();
        int z = raf.readInt();
        World world = Bukkit.getWorld(raf.readUTF());
        if(world != null){
          cinema.getRegion().setPos1(new Location(world,x,y,z));
        }
      }
      boolean twoSet = raf.readBoolean();
      if(twoSet){
        int x = raf.readInt();
        int y = raf.readInt();
        int z = raf.readInt();
        World world = Bukkit.getWorld(raf.readUTF());
        if(world != null){
          cinema.getRegion().setPos2(new Location(world,x,y,z));
        }
      }
      int count = raf.readInt();
View Full Code Here

    this.data = data;
  }
 
  @SuppressWarnings("deprecation")
  public void draw(Location offset){
    World world = offset.getWorld();
    Block block = world.getBlockAt(offset.getBlockX() + position.getX(), offset.getBlockY() + position.getY(), offset.getBlockZ() + position.getZ());
    block.setType(type);
    block.setData(data);
  }
View Full Code Here

        return true;
      }
    }else{ //is console
      if(args.length == 4){
        int x,y,z;
        World world;
        try{
          x = Integer.parseInt(args[0]);
        }catch(NumberFormatException nfe){
          sender.sendMessage("invalid value for parameter \"x\"");
          return true;
View Full Code Here

    if(args.length >= 6 && args.length <= 8){
      String id = args[0];
      String anim = args[1];
     
      int x=0,y=0,z=0;
      World world=null;
      try{
        x = Integer.parseInt(args[2]);
      }catch(NumberFormatException nfe){
        sender.sendMessage("Invalid value for parameter \"x\"");
        return true;
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.