Record Class BedrockCommandInfo
java.lang.Object
java.lang.Record
org.geysermc.geyser.translator.command.BedrockCommandInfo
- All Implemented Interfaces:
org.geysermc.geyser.api.event.downstream.ServerDefineCommandsEvent.CommandInfo,org.geysermc.geyser.api.event.java.ServerDefineCommandsEvent.CommandInfo
public record BedrockCommandInfo(String name, String description, org.cloudburstmc.protocol.bedrock.data.command.CommandOverloadData[] paramData)
extends Record
implements org.geysermc.geyser.api.event.downstream.ServerDefineCommandsEvent.CommandInfo, org.geysermc.geyser.api.event.java.ServerDefineCommandsEvent.CommandInfo
Stores the command description and parameter data for best optimizing the Bedrock commands packet.
-
Constructor Summary
ConstructorsConstructorDescriptionBedrockCommandInfo(String name, String description, org.cloudburstmc.protocol.bedrock.data.command.CommandOverloadData[] paramData) Creates an instance of aBedrockCommandInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.org.cloudburstmc.protocol.bedrock.data.command.CommandOverloadData[]Returns the value of theparamDatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BedrockCommandInfo
public BedrockCommandInfo(String name, String description, org.cloudburstmc.protocol.bedrock.data.command.CommandOverloadData[] paramData) Creates an instance of aBedrockCommandInforecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentparamData- the value for theparamDatarecord 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). -
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceorg.geysermc.geyser.api.event.downstream.ServerDefineCommandsEvent.CommandInfo- Specified by:
namein interfaceorg.geysermc.geyser.api.event.java.ServerDefineCommandsEvent.CommandInfo- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceorg.geysermc.geyser.api.event.downstream.ServerDefineCommandsEvent.CommandInfo- Specified by:
descriptionin interfaceorg.geysermc.geyser.api.event.java.ServerDefineCommandsEvent.CommandInfo- Returns:
- the value of the
descriptionrecord component
-
paramData
public org.cloudburstmc.protocol.bedrock.data.command.CommandOverloadData[] paramData()Returns the value of theparamDatarecord component.- Returns:
- the value of the
paramDatarecord component
-