Record Class TradeListPacket.ItemCost
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.TradeListPacket.ItemCost
- Enclosing class:
TradeListPacket
public static record TradeListPacket.ItemCost(Material material, int amount, DataComponentMap components)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionItemCost(Material material, int amount, DataComponentMap components) Creates an instance of aItemCostrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.Returns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.material()Returns the value of thematerialrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemCost
-
ItemCost
Creates an instance of aItemCostrecord class.- Parameters:
material- the value for thematerialrecord componentamount- the value for theamountrecord componentcomponents- the value for thecomponentsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-