Record Class CorpseSpawnRequest

java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.corpse.CorpseSpawnRequest

public record CorpseSpawnRequest(@NotNull org.bukkit.Location location, @NotNull org.bukkit.inventory.ItemStack[] storedContents, @NotNull org.bukkit.inventory.ItemStack[] visualArmor, @Nullable org.bukkit.inventory.ItemStack visualMainHand, @Nullable org.bukkit.inventory.ItemStack visualOffHand) extends Record
Complete inventory and visual data used for an explicitly spawned corpse.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CorpseSpawnRequest(@NotNull org.bukkit.Location location, @NotNull org.bukkit.inventory.ItemStack[] storedContents, @NotNull org.bukkit.inventory.ItemStack[] visualArmor, @Nullable org.bukkit.inventory.ItemStack visualMainHand, @Nullable org.bukkit.inventory.ItemStack visualOffHand)
    Creates an instance of a CorpseSpawnRequest record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.bukkit.Location
    Returns the value of the location record component.
    org.bukkit.inventory.ItemStack[]
    Returns the value of the storedContents record component.
    final String
    Returns a string representation of this record class.
    org.bukkit.inventory.ItemStack[]
    Returns the value of the visualArmor record component.
    org.bukkit.inventory.ItemStack
    Returns the value of the visualMainHand record component.
    org.bukkit.inventory.ItemStack
    Returns the value of the visualOffHand record component.

    Methods inherited from class java.lang.Object

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

    • CorpseSpawnRequest

      public CorpseSpawnRequest(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.inventory.ItemStack[] storedContents, @NotNull @NotNull org.bukkit.inventory.ItemStack[] visualArmor, @Nullable @Nullable org.bukkit.inventory.ItemStack visualMainHand, @Nullable @Nullable org.bukkit.inventory.ItemStack visualOffHand)
      Creates an instance of a CorpseSpawnRequest record class.
      Parameters:
      location - the value for the location record component
      storedContents - the value for the storedContents record component
      visualArmor - the value for the visualArmor record component
      visualMainHand - the value for the visualMainHand record component
      visualOffHand - the value for the visualOffHand record component
  • Method Details

    • location

      public org.bukkit.Location location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • storedContents

      public org.bukkit.inventory.ItemStack[] storedContents()
      Returns the value of the storedContents record component.
      Returns:
      the value of the storedContents record component
    • visualArmor

      public org.bukkit.inventory.ItemStack[] visualArmor()
      Returns the value of the visualArmor record component.
      Returns:
      the value of the visualArmor record component
    • visualMainHand

      public org.bukkit.inventory.ItemStack visualMainHand()
      Returns the value of the visualMainHand record component.
      Returns:
      the value of the visualMainHand record component
    • visualOffHand

      public org.bukkit.inventory.ItemStack visualOffHand()
      Returns the value of the visualOffHand record component.
      Returns:
      the value of the visualOffHand record component
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.