Package org.bukkit

Examples of org.bukkit.Location.clone()


    Location loc = groupHomes.get(groupName);
    if (loc == null)
      return null;
   
    return loc.clone();
  }

  /**
   * remove user's home
   *
 
View Full Code Here


    checkFile();

    Location loc = homes.get(playerName);
    if (loc == null)
      return null;
    return loc.clone();
  }

  /**
   * remove user's home
   *
 
View Full Code Here

        return;
      carpet.removeCarpet(player.getWorld());
        to.setY(to.getY()-1);
      if(from.getPitch() == 90 && (to.getX() != from.getX() || to.getZ() != from.getZ()))
        to.setY(to.getY()-1);
      carpet.currentLoc = to.clone();
      carpet.drawCarpet(player.getWorld());
    }
   
    public void onPlayerTeleport (PlayerMoveEvent event) {
      Location to = event.getTo().clone();
View Full Code Here

                }

                if (hasFound) {
                    double yOff = ((LivingEntity) ent).getEyeHeight();
                    Location k = LocationUtil.getCenterOfBlock(LocationUtil.getNextFreeSpace(getBackBlock(), BlockFace.UP));
                    Arrow ar = area.getWorld().spawnArrow(k, ent.getLocation().add(0, yOff, 0).subtract(k.clone().add(0.5,0.5,0.5)).toVector().normalize(), speed, 0);
                    if(!((LivingEntity)ent).hasLineOfSight(ar)) {
                        ar.remove();
                        continue;
                    }
                    break;
View Full Code Here

    if (to == null)
      return;
    if (Math.abs(to.getX() - to.getBlockX() - 0.5) < Skript.EPSILON && Math.abs(to.getZ() - to.getBlockZ() - 0.5) < Skript.EPSILON) {
      final Block on = to.getBlock().getRelative(BlockFace.DOWN);
      if (on.getType() != Material.AIR) {
        to = to.clone();
        to.setY(on.getY() + Utils.getBlockHeight(on.getTypeId(), on.getData()));
      }
    }
    for (final Entity entity : entities.getArray(e)) {
      final Location loc;
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.