Record Class CosmeticPreview
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.cosmetics.CosmeticPreview
- Record Components:
location- where the cosmetic should appearshowcase- whether the preview shows in the showcase
public record CosmeticPreview(@NotNull org.bukkit.Location location, boolean showcase)
extends Record
Where a cosmetic preview shows, and how, as passed to
CosmeticHandler.startPreview(org.bukkit.entity.Player, CosmeticDefinition, CosmeticPreview, Runnable).
In place, location() is the player's own location and the cosmetic shows on them.
In the showcase, the player watches a still model of themselves from a viewing spot, and the
cosmetic shows at the model's location instead - not on the player, who may be some distance
away.
- Since:
- 1.13.0
-
Constructor Summary
ConstructorsConstructorDescriptionCosmeticPreview(@NotNull org.bukkit.Location location, boolean showcase) Creates an instance of aCosmeticPreviewrecord 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.@NotNull org.bukkit.Locationlocation()Returns the value of thelocationrecord component.booleanshowcase()Returns the value of theshowcaserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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 '=='. -
location
@NotNull public @NotNull org.bukkit.Location location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
showcase
public boolean showcase()Returns the value of theshowcaserecord component.- Returns:
- the value of the
showcaserecord component
-