Record Class ChatRestriction.Action
java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.chat.ChatRestriction.Action
- Enclosing class:
ChatRestriction
public static record ChatRestriction.Action(Component title, BiConsumer<Minecraft, Screen> runnable)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChatRestriction.Actionstatic final ChatRestriction.Actionprivate final BiConsumer<Minecraft, Screen> The field for therunnablerecord component.private final ComponentThe field for thetitlerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAction(Component title, BiConsumer<Minecraft, Screen> runnable) Creates an instance of aActionrecord 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.runnable()Returns the value of therunnablerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
title
The field for thetitlerecord component. -
runnable
The field for therunnablerecord component. -
GO_TO_ACCOUNT
-
GO_TO_CHAT_SETTINGS
-
-
Constructor Details
-
Action
Creates an instance of aActionrecord class.- Parameters:
title- the value for thetitlerecord componentrunnable- the value for therunnablerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
runnable
Returns the value of therunnablerecord component.- Returns:
- the value of the
runnablerecord component
-