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
ConstructorDescriptionPluginMessageServerboundHandshake
(int protocolVersion) Construct a newPluginMessageServerboundHandshake
.PluginMessageServerboundHandshake
(@NotNull PluginMessageByteBuffer buffer) Construct a newPluginMessageServerboundHandshake
with input. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the client's VeinMiner protocol version.void
handle
(@NotNull ServerboundPluginMessageListener listener) Handle this message.void
write
(@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 newPluginMessageServerboundHandshake
with 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:PluginMessage
Write this plugin message to the providedPluginMessageByteBuffer
.- Specified by:
write
in interfacePluginMessage<ServerboundPluginMessageListener>
- Parameters:
buffer
- the buffer to which data should be written
-
handle
Description copied from interface:PluginMessage
Handle this message.- Specified by:
handle
in interfacePluginMessage<ServerboundPluginMessageListener>
- Parameters:
listener
- the plugin message listener
-