Class FLocation

  • All Implemented Interfaces:
    java.io.Serializable

    public class FLocation
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • FLocation

        public FLocation()
      • FLocation

        public FLocation​(java.lang.String worldName,
                         int x,
                         int z)
      • FLocation

        public FLocation​(org.bukkit.Location location)
      • FLocation

        public FLocation​(org.bukkit.entity.Player player)
      • FLocation

        public FLocation​(FPlayer fplayer)
      • FLocation

        public FLocation​(org.bukkit.block.Block block)
    • Method Detail

      • fromString

        public static FLocation fromString​(java.lang.String string)
      • blockToChunk

        public static int blockToChunk​(int blockVal)
      • blockToRegion

        public static int blockToRegion​(int blockVal)
      • chunkToRegion

        public static int chunkToRegion​(int chunkVal)
      • chunkToBlock

        public static int chunkToBlock​(int chunkVal)
      • regionToBlock

        public static int regionToBlock​(int regionVal)
      • regionToChunk

        public static int regionToChunk​(int regionVal)
      • getChunk

        public org.bukkit.Chunk getChunk()
      • getWorldName

        public java.lang.String getWorldName()
      • setWorldName

        public void setWorldName​(java.lang.String worldName)
      • getWorld

        public org.bukkit.World getWorld()
      • getX

        public long getX()
      • setX

        public void setX​(int x)
      • getZ

        public long getZ()
      • setZ

        public void setZ​(int z)
      • getCoordString

        public java.lang.String getCoordString()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getRelative

        public FLocation getRelative​(int dx,
                                     int dz)
      • getDistanceTo

        public double getDistanceTo​(FLocation that)
      • getDistanceSquaredTo

        public double getDistanceSquaredTo​(FLocation that)
      • isInChunk

        public boolean isInChunk​(org.bukkit.Location loc)
      • isOutsideWorldBorder

        public boolean isOutsideWorldBorder​(int buffer)
        Checks if the chunk represented by this FLocation is outside the world border
        Parameters:
        buffer - the number of chunks from the border that will be treated as "outside"
        Returns:
        whether this location is outside of the border
      • getCircle

        public java.util.Set<FLocation> getCircle​(double radius)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object