Package kr.toxicity.model.api.bone
Record Class CustomBoneTag
java.lang.Object
java.lang.Record
kr.toxicity.model.api.bone.CustomBoneTag
- Record Components:
name- name- tagsitemMapper- item mapper
- All Implemented Interfaces:
BoneTag
public record CustomBoneTag(@NotNull String name, @NotNull String[] tags, @Nullable BoneItemMapper itemMapper)
extends Record
implements BoneTag
Custom bone tag
-
Constructor Summary
ConstructorsConstructorDescriptionCustomBoneTag(@NotNull String name, @NotNull String[] tags, @Nullable BoneItemMapper itemMapper) Creates an instance of aCustomBoneTagrecord class.CustomBoneTag(@NotNull String name, org.bukkit.entity.ItemDisplay.ItemDisplayTransform transform, @NotNull String[] tags, @NotNull Function<org.bukkit.entity.Player, TransformedItemStack> mapper) Creates bone tag for player -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@Nullable BoneItemMapperReturns the value of theitemMapperrecord component.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull String[]tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CustomBoneTag
public CustomBoneTag(@NotNull @NotNull String name, @NotNull org.bukkit.entity.ItemDisplay.ItemDisplayTransform transform, @NotNull @NotNull String[] tags, @NotNull @NotNull Function<org.bukkit.entity.Player, TransformedItemStack> mapper) Creates bone tag for player- Parameters:
name- nametransform- item transformationtags- tagsmapper- item mapper
-
CustomBoneTag
public CustomBoneTag(@NotNull @NotNull String name, @NotNull @NotNull String[] tags, @Nullable @Nullable BoneItemMapper itemMapper) Creates an instance of aCustomBoneTagrecord class.- Parameters:
name- the value for thenamerecord componenttags- the value for thetagsrecord componentitemMapper- the value for theitemMapperrecord component
-
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
name
Returns the value of thenamerecord component. -
tags
Returns the value of thetagsrecord component. -
itemMapper
Returns the value of theitemMapperrecord component.- Specified by:
itemMapperin interfaceBoneTag- Returns:
- the value of the
itemMapperrecord component
-