Package io.github.apfelcreme.Pipes.Pipe
Class SimpleLocation
java.lang.Object
io.github.apfelcreme.Pipes.Pipe.SimpleLocation
-
Constructor Summary
ConstructorDescriptionSimpleLocation
(SimpleLocation location) SimpleLocation
(String worldName, int x, int y, int z) SimpleLocation
(org.bukkit.Location location) -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleLocation
deserialize
(Map<String, Object> args) Deserialize a SimpleLocation object from a map generated by serializeboolean
checks if this objects equals another objectorg.bukkit.block.Block
getBlock()
returns a bukkit blockorg.bukkit.Location
returns a bukkit locationgetRelative
(org.bukkit.block.BlockFace face) returns the location that faces the block location to the given sidereturns the world nameint
getX()
returns the x coordinateint
getY()
returns the y coordinateint
getZ()
returns the z coordinateint
hashCode()
toString()
-
Constructor Details
-
SimpleLocation
-
SimpleLocation
public SimpleLocation(org.bukkit.Location location) -
SimpleLocation
-
-
Method Details
-
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
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
checks if this objects equals another object -
hashCode
public int hashCode() -
toString
-
serialize
-
deserialize
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
-