Package me.deecaad.core.placeholder
Record Class PlaceholderData.Direct
java.lang.Object
java.lang.Record
me.deecaad.core.placeholder.PlaceholderData.Direct
- All Implemented Interfaces:
PlaceholderData
- Enclosing interface:
PlaceholderData
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.deecaad.core.placeholder.PlaceholderData
PlaceholderData.Builder, PlaceholderData.Direct -
Constructor Summary
Constructors -
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.@Nullable org.bukkit.inventory.ItemStackitem()Returns the value of theitemrecord component.@Nullable StringReturns the value of theitemTitlerecord component.Returns the value of theplaceholdersrecord component.@Nullable org.bukkit.entity.Playerplayer()Returns the value of theplayerrecord component.@Nullable org.bukkit.inventory.EquipmentSlotslot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Direct
public Direct(@Nullable @Nullable org.bukkit.entity.Player player, @Nullable @Nullable org.bukkit.inventory.ItemStack item, @Nullable @Nullable String itemTitle, @Nullable @Nullable org.bukkit.inventory.EquipmentSlot slot, @NotNull @NotNull Map<String, String> placeholders) Creates an instance of aDirectrecord class.- Parameters:
player- the value for theplayerrecord componentitem- the value for theitemrecord componentitemTitle- the value for theitemTitlerecord componentslot- the value for theslotrecord componentplaceholders- the value for theplaceholdersrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
player
@Nullable public @Nullable org.bukkit.entity.Player player()Returns the value of theplayerrecord component.- Specified by:
playerin interfacePlaceholderData- Returns:
- the value of the
playerrecord component
-
item
@Nullable public @Nullable org.bukkit.inventory.ItemStack item()Returns the value of theitemrecord component.- Specified by:
itemin interfacePlaceholderData- Returns:
- the value of the
itemrecord component
-
itemTitle
Returns the value of theitemTitlerecord component.- Specified by:
itemTitlein interfacePlaceholderData- Returns:
- the value of the
itemTitlerecord component
-
slot
@Nullable public @Nullable org.bukkit.inventory.EquipmentSlot slot()Returns the value of theslotrecord component.- Specified by:
slotin interfacePlaceholderData- Returns:
- the value of the
slotrecord component
-
placeholders
Returns the value of theplaceholdersrecord component.- Specified by:
placeholdersin interfacePlaceholderData- Returns:
- the value of the
placeholdersrecord component
-