// Creating a location at coordinates (3, 64, -7) Location loc = new Location(world, 3, 64, -7); // Getting coordinates of the location double x = loc.getX(); double y = loc.getY(); double z = loc.getZ();
// Creating a location at coordinates (3, 64, -7) Location loc = new Location(world, 3, 64, -7); // Setting the pitch and yaw of the location's orientation loc.setPitch(45); loc.setYaw(180);This code creates a location object at (3, 64, -7) and sets its pitch to 45 degrees and its yaw to 180 degrees. Package/Library: org.bukkit.Location