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

    Constructors
    Constructor
    Description
    GateData(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing)
    Creates an instance of a GateData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    org.bukkit.block.BlockFace
    Returns the value of the facing record component.
    boolean
    Returns the value of the flipZ record component.
    Returns the value of the gateFormat record component.
    final int
    Returns a hash code value for this object.
    org.bukkit.Location
    Returns the value of the topLeft record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GateData

      public GateData(GateFormatAPI gateFormat, boolean flipZ, org.bukkit.Location topLeft, org.bukkit.block.BlockFace facing)
      Creates an instance of a GateData record class.
      Parameters:
      gateFormat - the value for the gateFormat record component
      flipZ - the value for the flipZ record component
      topLeft - the value for the topLeft record component
      facing - the value for the facing record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • gateFormat

      public GateFormatAPI gateFormat()
      Returns the value of the gateFormat record component.
      Returns:
      the value of the gateFormat record component
    • flipZ

      public boolean flipZ()
      Returns the value of the flipZ record component.
      Returns:
      the value of the flipZ record component
    • topLeft

      public org.bukkit.Location topLeft()
      Returns the value of the topLeft record component.
      Returns:
      the value of the topLeft record component
    • facing

      public org.bukkit.block.BlockFace facing()
      Returns the value of the facing record component.
      Returns:
      the value of the facing record component