Class SimpleLocation

java.lang.Object
io.github.apfelcreme.Pipes.Pipe.SimpleLocation

public class SimpleLocation
extends Object
  • Constructor Details

  • Method Details

    • getWorldName

      public String getWorldName()
      returns the world name
      Returns:
      the world name
    • getX

      public int getX()
      returns the x coordinate
      Returns:
      the x coordinate
    • getY

      public int getY()
      returns the y coordinate
      Returns:
      the y coordinate
    • getZ

      public int getZ()
      returns the z coordinate
      Returns:
      the z coordinate
    • getRelative

      public SimpleLocation getRelative​(org.bukkit.block.BlockFace face)
      returns the location that faces the block location to the given side
      Parameters:
      face - a direction
      Returns:
      the location that faces the block location to the given side
    • getLocation

      public org.bukkit.Location getLocation()
      returns a bukkit location
      Returns:
      a bukkit location
    • getBlock

      public org.bukkit.block.Block getBlock()
      returns a bukkit block
      Returns:
      a bukkit block
    • equals

      public boolean equals​(Object o)
      checks if this objects equals another object
      Overrides:
      equals in class Object
      Parameters:
      o - another SimpleLocation
      Returns:
      true or false
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • serialize

      public Map<String,​Object> serialize()
    • deserialize

      public static SimpleLocation deserialize​(Map<String,​Object> args) throws IllegalArgumentException
      Deserialize a SimpleLocation object from a map generated by serialize
      Parameters:
      args - The map with the arguments
      Returns:
      The deserialized SimpleLocation
      Throws:
      IllegalArgumentException - When one of either world, x, y or z is missing in the map