Class EncoderPair<T>
java.lang.Object
de.craftsblock.craftsnet.api.codec.CodecPair<T,Encoder<T,?>>
de.craftsblock.craftsnet.api.codec.EncoderPair<T>
- Type Parameters:
T- The target type to be encoded.
A pairing between a specific target type and its associated
Encoder.
This class allows registration or lookup of encoders based on the target type they support.
-
Constructor Summary
ConstructorsConstructorDescriptionEncoderPair(Class<T> target, Encoder<T, ?> codec) Constructs a newEncoderPairfor the given target type and encoder. -
Method Summary
Methods inherited from class de.craftsblock.craftsnet.api.codec.CodecPair
asCodecSubtype, canCodecType, getCodec, getTarget
-
Constructor Details
-
EncoderPair
Constructs a newEncoderPairfor the given target type and encoder.- Parameters:
target- The type the encoder can encode.codec- The encoder instance.
-