Enum Class Compass

java.lang.Object
java.lang.Enum<Compass>
org.kingdoms.utils.Compass
All Implemented Interfaces:
Serializable, Comparable<Compass>, Constable

public enum Compass extends Enum<Compass>
  • Enum Constant Details

    • NORTH

      public static final Compass NORTH
    • NORTH_EAST

      public static final Compass NORTH_EAST
    • EAST

      public static final Compass EAST
    • SOUTH_EAST

      public static final Compass SOUTH_EAST
    • SOUTH

      public static final Compass SOUTH
    • SOUTH_WEST

      public static final Compass SOUTH_WEST
    • WEST

      public static final Compass WEST
    • NORTH_WEST

      public static final Compass NORTH_WEST
  • Field Details

    • CARDINAL_DIRECTIONS

      public static final Compass[] CARDINAL_DIRECTIONS
  • Method Details

    • values

      public static Compass[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Compass valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCardinalDirection

      public static Optional<Compass> getCardinalDirection(KingdomPlayer kp, String direction)
    • getLanguage

      public KingdomsLang getLanguage()
    • getCardinalDirection

      public static Compass getCardinalDirection(float degrees)
    • getCardinalDirection

      public static Compass getCardinalDirection(org.bukkit.entity.Entity entity)
    • getCardinalDirection

      public static Compass getCardinalDirection(org.bukkit.Location location)
    • translateCardinalDirection

      public static Messenger translateCardinalDirection(org.bukkit.entity.Player player)
    • toBlockFace

      public org.bukkit.block.BlockFace toBlockFace()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Compass>