Record Class GravelessNetworking.GraveListPayload

java.lang.Object
java.lang.Record
com.breakinblocks.graveless.net.GravelessNetworking.GraveListPayload
All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
Enclosing class:
GravelessNetworking

public static record GravelessNetworking.GraveListPayload(UUID ownerId, String ownerName, List<GravelessNetworking.GraveSummary> graves, boolean admin, boolean ownerEnabled, Optional<UUID> trackedId, List<GravelessNetworking.PlayerEntry> players, List<GravelessNetworking.PlayerEntry> allowed) extends Record implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
  • Field Details

  • Constructor Details

    • GraveListPayload

      public GraveListPayload(UUID ownerId, String ownerName, List<GravelessNetworking.GraveSummary> graves, boolean admin, boolean ownerEnabled, Optional<UUID> trackedId, List<GravelessNetworking.PlayerEntry> players, List<GravelessNetworking.PlayerEntry> allowed)
      Creates an instance of a GraveListPayload record class.
      Parameters:
      ownerId - the value for the ownerId record component
      ownerName - the value for the ownerName record component
      graves - the value for the graves record component
      admin - the value for the admin record component
      ownerEnabled - the value for the ownerEnabled record component
      trackedId - the value for the trackedId record component
      players - the value for the players record component
      allowed - the value for the allowed record component
  • Method Details

    • type

      public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()
      Specified by:
      type in interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • ownerId

      public UUID ownerId()
      Returns the value of the ownerId record component.
      Returns:
      the value of the ownerId record component
    • ownerName

      public String ownerName()
      Returns the value of the ownerName record component.
      Returns:
      the value of the ownerName record component
    • graves

      Returns the value of the graves record component.
      Returns:
      the value of the graves record component
    • admin

      public boolean admin()
      Returns the value of the admin record component.
      Returns:
      the value of the admin record component
    • ownerEnabled

      public boolean ownerEnabled()
      Returns the value of the ownerEnabled record component.
      Returns:
      the value of the ownerEnabled record component
    • trackedId

      public Optional<UUID> trackedId()
      Returns the value of the trackedId record component.
      Returns:
      the value of the trackedId record component
    • players

      Returns the value of the players record component.
      Returns:
      the value of the players record component
    • allowed

      Returns the value of the allowed record component.
      Returns:
      the value of the allowed record component