Record Class Schema<T>
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.api.Schema<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thecodecrecord component.static final SchemaComponent<Difficulty> static final Schema<DiscoveryService.DiscoverResponse> The field for theenumValuesrecord component.static final SchemaComponent<GameType> static final SchemaComponent<IpBanlistService.IncomingIpBanDto> static final SchemaComponent<IpBanlistService.IpBanDto> The field for theitemsrecord component.static final SchemaComponent<PlayerService.KickDto> static final SchemaComponent<Message> static final SchemaComponent<OperatorService.OperatorDto> static final Schema<PermissionLevel> static final SchemaComponent<BanlistService.UserBanDto> static final SchemaComponent<PlayerDto> The field for thepropertiesrecord component.The field for thereferencerecord component.static final Schema<GameRuleType> private static final List<SchemaComponent<?>> static final SchemaComponent<ServerStateService.ServerState> static final SchemaComponent<ServerStateService.SystemMessage> The field for thetyperecord component.static final SchemaComponent<GameRulesService.GameRuleUpdate<?>> static final SchemaComponent<GameRulesService.GameRuleUpdate<?>> static final SchemaComponent<DiscoveryService.DiscoverInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasArray()codec()Returns the value of thecodecrecord component.Returns the value of theenumValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.static List<SchemaComponent<?>> final inthashCode()Returns a hash code value for this object.info()items()Returns the value of theitemsrecord component.static <E extends Enum<E> & StringRepresentable>
Schema<E> static <E extends Enum<E> & StringRepresentable>
Schema<E> static <T> Schema<T> static <T> Schema<T> static <T> Schema<T> static <T> Schema<T> Returns the value of thepropertiesrecord component.static <T> Schema<T> private static <T> Schema<T> Returns the value of thereferencerecord component.private static <T> SchemaComponent<T> registerSchema(String name, Schema<T> schema) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
reference
-
type
-
items
-
properties
-
enumValues
-
codec
-
CODEC
-
SCHEMA_REGISTRY
-
BOOL_SCHEMA
-
INT_SCHEMA
-
BOOL_OR_INT_SCHEMA
-
NUMBER_SCHEMA
-
STRING_SCHEMA
-
UUID_SCHEMA
-
DISCOVERY_SCHEMA
-
DIFFICULTY_SCHEMA
-
GAME_TYPE_SCHEMA
-
PERMISSION_LEVEL_SCHEMA
-
PLAYER_SCHEMA
-
VERSION_SCHEMA
-
SERVER_STATE_SCHEMA
-
RULE_TYPE_SCHEMA
-
TYPED_GAME_RULE_SCHEMA
-
UNTYPED_GAME_RULE_SCHEMA
-
MESSAGE_SCHEMA
-
SYSTEM_MESSAGE_SCHEMA
-
KICK_PLAYER_SCHEMA
-
OPERATOR_SCHEMA
-
INCOMING_IP_BAN_SCHEMA
-
IP_BAN_SCHEMA
-
PLAYER_BAN_SCHEMA
-
-
Constructor Details
-
Schema
public Schema(Optional<URI> reference, List<String> type, Optional<Schema<?>> items, Map<String, Schema<?>> properties, List<String> enumValues, Codec<T> codec) Creates an instance of aSchemarecord class.- Parameters:
reference- the value for thereferencerecord componenttype- the value for thetyperecord componentitems- the value for theitemsrecord componentproperties- the value for thepropertiesrecord componentenumValues- the value for theenumValuesrecord componentcodec- the value for thecodecrecord component
-
-
Method Details
-
typedCodec
-
info
-
registerSchema
-
getSchemaRegistry
-
ofRef
-
ofType
-
ofTypes
-
ofEnum
-
ofEnum
public static <E extends Enum<E> & StringRepresentable> Schema<E> ofEnum(Supplier<E[]> values, Codec<E> codec) -
ofEnum
-
arrayOf
-
record
-
record
-
withField
-
asArray
-
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). -
reference
-
type
-
items
-
properties
-
enumValues
-
codec
-