Archiviert
13
0

Add BlockPosition#toLocation

Dieser Commit ist enthalten in:
Dan Mulloy 2015-08-29 12:42:47 -04:00
Ursprung fc28a9242c
Commit a2452cba67

Datei anzeigen

@ -18,6 +18,8 @@ package com.comphenix.protocol.wrappers;
import java.lang.reflect.Constructor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.util.Vector;
import com.comphenix.protocol.reflect.EquivalentConverter;
@ -80,6 +82,15 @@ public class BlockPosition {
return new Vector(x, y, z);
}
/**
* Convert this instance to an equivalent Location.
* @param world World for the location
* @return Location
*/
public Location toLocation(World world) {
return new Location(world, x, y, z);
}
/**
* Retrieve the x-coordinate.
* @return X coordinate.