public class FLocation
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
FLocation() |
FLocation(org.bukkit.block.Block block) |
FLocation(FPlayer fplayer) |
FLocation(org.bukkit.Location location) |
FLocation(org.bukkit.entity.Player player) |
FLocation(java.lang.String worldName,
int x,
int z) |
Modifier and Type | Method and Description |
---|---|
static int |
blockToChunk(int blockVal) |
static int |
blockToRegion(int blockVal) |
static int |
chunkToBlock(int chunkVal) |
static int |
chunkToRegion(int chunkVal) |
boolean |
equals(java.lang.Object obj) |
static FLocation |
fromString(java.lang.String string) |
static java.util.HashSet<FLocation> |
getArea(FLocation from,
FLocation to) |
org.bukkit.Chunk |
getChunk() |
java.util.Set<FLocation> |
getCircle(double radius) |
java.lang.String |
getCoordString() |
double |
getDistanceSquaredTo(FLocation that) |
double |
getDistanceTo(FLocation that) |
FLocation |
getRelative(int dx,
int dz) |
org.bukkit.World |
getWorld() |
java.lang.String |
getWorldName() |
long |
getX() |
long |
getZ() |
int |
hashCode() |
boolean |
isInChunk(org.bukkit.Location loc) |
boolean |
isOutsideWorldBorder(int buffer)
Checks if the chunk represented by this FLocation is outside the world border
|
static int |
regionToBlock(int regionVal) |
static int |
regionToChunk(int regionVal) |
void |
setWorldName(java.lang.String worldName) |
void |
setX(int x) |
void |
setZ(int z) |
java.lang.String |
toString() |
public FLocation()
public FLocation(java.lang.String worldName, int x, int z)
public FLocation(org.bukkit.Location location)
public FLocation(org.bukkit.entity.Player player)
public FLocation(FPlayer fplayer)
public FLocation(org.bukkit.block.Block block)
public static FLocation fromString(java.lang.String string)
public static int blockToChunk(int blockVal)
public static int blockToRegion(int blockVal)
public static int chunkToRegion(int chunkVal)
public static int chunkToBlock(int chunkVal)
public static int regionToBlock(int regionVal)
public static int regionToChunk(int regionVal)
public org.bukkit.Chunk getChunk()
public java.lang.String getWorldName()
public void setWorldName(java.lang.String worldName)
public org.bukkit.World getWorld()
public long getX()
public void setX(int x)
public long getZ()
public void setZ(int z)
public java.lang.String getCoordString()
public java.lang.String toString()
toString
in class java.lang.Object
public FLocation getRelative(int dx, int dz)
public double getDistanceTo(FLocation that)
public double getDistanceSquaredTo(FLocation that)
public boolean isInChunk(org.bukkit.Location loc)
public boolean isOutsideWorldBorder(int buffer)
buffer
- the number of chunks from the border that will be treated as "outside"public java.util.Set<FLocation> getCircle(double radius)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object