Class PluginMessageServerboundHandshake
java.lang.Object
wtf.choco.veinminer.network.protocol.serverbound.PluginMessageServerboundHandshake
- All Implemented Interfaces:
PluginMessage<ServerboundPluginMessageListener>
public final class PluginMessageServerboundHandshake
extends Object
implements PluginMessage<ServerboundPluginMessageListener>
A server bound
PluginMessage including the following data:
- VarInt: protocol version
-
Constructor Summary
ConstructorsConstructorDescriptionPluginMessageServerboundHandshake(int protocolVersion) Construct a newPluginMessageServerboundHandshake.PluginMessageServerboundHandshake(@NotNull PluginMessageByteBuffer buffer) Construct a newPluginMessageServerboundHandshakewith input. -
Method Summary
Modifier and TypeMethodDescriptionintGet the client's VeinMiner protocol version.voidhandle(@NotNull ServerboundPluginMessageListener listener) Handle this message.voidwrite(@NotNull PluginMessageByteBuffer buffer) Write this plugin message to the providedPluginMessageByteBuffer.
-
Constructor Details
-
PluginMessageServerboundHandshake
public PluginMessageServerboundHandshake(int protocolVersion) Construct a newPluginMessageServerboundHandshake.- Parameters:
protocolVersion- the client's VeinMiner protocol version
-
PluginMessageServerboundHandshake
@Internal public PluginMessageServerboundHandshake(@NotNull @NotNull PluginMessageByteBuffer buffer) Construct a newPluginMessageServerboundHandshakewith input.- Parameters:
buffer- the input buffer
-
-
Method Details
-
getProtocolVersion
public int getProtocolVersion()Get the client's VeinMiner protocol version.- Returns:
- the protocol version
-
write
Description copied from interface:PluginMessageWrite this plugin message to the providedPluginMessageByteBuffer.- Specified by:
writein interfacePluginMessage<ServerboundPluginMessageListener>- Parameters:
buffer- the buffer to which data should be written
-
handle
Description copied from interface:PluginMessageHandle this message.- Specified by:
handlein interfacePluginMessage<ServerboundPluginMessageListener>- Parameters:
listener- the plugin message listener
-