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
ConstructorsConstructorDescriptionCorpseSpawnRequest(@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 aCorpseSpawnRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.bukkit.Locationlocation()Returns the value of thelocationrecord component.org.bukkit.inventory.ItemStack[]Returns the value of thestoredContentsrecord component.final StringtoString()Returns a string representation of this record class.org.bukkit.inventory.ItemStack[]Returns the value of thevisualArmorrecord component.org.bukkit.inventory.ItemStackReturns the value of thevisualMainHandrecord component.org.bukkit.inventory.ItemStackReturns the value of thevisualOffHandrecord component.
-
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 aCorpseSpawnRequestrecord class.- Parameters:
location- the value for thelocationrecord componentstoredContents- the value for thestoredContentsrecord componentvisualArmor- the value for thevisualArmorrecord componentvisualMainHand- the value for thevisualMainHandrecord componentvisualOffHand- the value for thevisualOffHandrecord component
-
-
Method Details
-
location
public org.bukkit.Location location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
storedContents
public org.bukkit.inventory.ItemStack[] storedContents()Returns the value of thestoredContentsrecord component.- Returns:
- the value of the
storedContentsrecord component
-
visualArmor
public org.bukkit.inventory.ItemStack[] visualArmor()Returns the value of thevisualArmorrecord component.- Returns:
- the value of the
visualArmorrecord component
-
visualMainHand
public org.bukkit.inventory.ItemStack visualMainHand()Returns the value of thevisualMainHandrecord component.- Returns:
- the value of the
visualMainHandrecord component
-
visualOffHand
public org.bukkit.inventory.ItemStack visualOffHand()Returns the value of thevisualOffHandrecord component.- Returns:
- the value of the
visualOffHandrecord component
-
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. All components in this record class are compared withObjects::equals(Object,Object).
-