Record Class GateData
java.lang.Object
java.lang.Record
org.sgrewritten.stargate.network.portal.portaldata.GateData
- Record Components:
gateFormat
- What defines this gate's layout/format/design.flipZ
- Whether this portal is flipped on the Z axis.topLeft
- The Location of the top-left block of this portal.facing
- The direction that this portal is facing.
public record GateData(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing)
extends Record
-
Constructor Summary
ConstructorDescriptionGateData
(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing) Creates an instance of aGateData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.org.bukkit.block.BlockFace
facing()
Returns the value of thefacing
record component.boolean
flipZ()
Returns the value of theflipZ
record component.Returns the value of thegateFormat
record component.final int
hashCode()
Returns a hash code value for this object.org.bukkit.Location
topLeft()
Returns the value of thetopLeft
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
GateData
public GateData(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing) Creates an instance of aGateData
record class.- Parameters:
gateFormat
- the value for thegateFormat
record componentflipZ
- the value for theflipZ
record componenttopLeft
- the value for thetopLeft
record componentfacing
- the value for thefacing
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
gateFormat
Returns the value of thegateFormat
record component.- Returns:
- the value of the
gateFormat
record component
-
flipZ
public boolean flipZ()Returns the value of theflipZ
record component.- Returns:
- the value of the
flipZ
record component
-
topLeft
public org.bukkit.Location topLeft()Returns the value of thetopLeft
record component.- Returns:
- the value of the
topLeft
record component
-
facing
public org.bukkit.block.BlockFace facing()Returns the value of thefacing
record component.- Returns:
- the value of the
facing
record component
-