Class Position

java.lang.Object
com.palmergames.bukkit.towny.object.Position
Direct Known Subclasses:
SpawnPointLocation

public class Position extends Object
  • Constructor Details

    • Position

      @Internal protected Position(TownyWorld world, double x, double y, double z, float pitch, float yaw)
  • Method Details

    • world

      public TownyWorld world()
    • x

      public double x()
    • y

      public double y()
    • z

      public double z()
    • pitch

      public float pitch()
    • yaw

      public float yaw()
    • blockX

      public int blockX()
    • blockY

      public int blockY()
    • blockZ

      public int blockZ()
    • worldCoord

      public WorldCoord worldCoord()
    • positionOf

      public static Position positionOf(@NotNull @NotNull TownyWorld world, double x, double y, double z)
    • positionOf

      public static Position positionOf(@NotNull @NotNull TownyWorld world, double x, double y, double z, float pitch, float yaw)
    • asLocation

      @NotNull public @NotNull org.bukkit.Location asLocation()
    • blockPosition

      @NotNull public @NotNull Position blockPosition()
    • ofLocation

      public static Position ofLocation(@NotNull @NotNull org.bukkit.Location location)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • serialize

      @NotNull public @NotNull String[] serialize()
    • deserialize

      public static Position deserialize(@NotNull @NotNull String[] data) throws IllegalArgumentException
      Throws:
      IllegalArgumentException