Add BlockPosition#toLocation
Dieser Commit ist enthalten in:
Ursprung
fc28a9242c
Commit
a2452cba67
@ -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.
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren