Class SquaremapLocation

java.lang.Object
io.github.emcw.squaremap.entities.SquaremapLocation
All Implemented Interfaces:
IGsonSerializable

public class SquaremapLocation extends Object implements IGsonSerializable
  • Constructor Details

    • SquaremapLocation

      public SquaremapLocation(Integer x, Integer z)
      A point in 2D space.
      Parameters:
      x - The coordinate on the x-axis (left/right).
      z - The coordinate on the z-axis (up/down).
    • SquaremapLocation

      public SquaremapLocation(Integer x, Integer y, Integer z)
      A point in 3D space.
      Parameters:
      x - The coordinate on the x-axis (left/right).
      y - The coordinate on the z-axis (up/down).
      z - The coordinate on the z-axis (forward/backward).
  • Method Details

    • isValidPoint

      public boolean isValidPoint()
      Check if this location is properly initialized.

      Shorthand for x != null && z != null.
    • isMapCenter

      public boolean isMapCenter()
      Whether this location points to the center of the map.

      Shorthand for x == 0 && z == 0.
    • of

      public static SquaremapLocation of(int[] xArr, int[] zArr)