public class ForgeClientHandler extends Object
Constructor and Description |
---|
ForgeClientHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handle(PluginMessage message)
Handles the Forge packet.
|
boolean |
isForgeUser()
Returns whether we know if the user is a forge user.
|
boolean |
isHandshakeComplete()
Returns whether the handshake is complete.
|
void |
receive(PluginMessage message)
Receives a
PluginMessage from ForgeServer to pass to Client. |
void |
resetHandshake()
Resets the client handshake state to HELLO, and, if we know the handshake
has been completed before, send the reset packet.
|
void |
setHandshakeComplete() |
void |
setServerIdList(PluginMessage idList)
Sends the server ID list to the client, or stores it for sending later.
|
void |
setServerModList(PluginMessage modList)
Sends the server mod list to the client, or stores it for sending later.
|
public void handle(PluginMessage message) throws IllegalArgumentException
message
- The Forge Handshake packet to handle.IllegalArgumentException
- if invalid packet receivedpublic void receive(PluginMessage message) throws IllegalArgumentException
PluginMessage
from ForgeServer to pass to Client.message
- The message to being received.IllegalArgumentException
- if invalid packet receivedpublic void resetHandshake()
public void setServerModList(PluginMessage modList) throws IllegalArgumentException
modList
- The PluginMessage
to send to the client containing
the mod list.IllegalArgumentException
- Thrown if the PluginMessage
was
not as expected.public void setServerIdList(PluginMessage idList) throws IllegalArgumentException
idList
- The PluginMessage
to send to the client containing
the ID list.IllegalArgumentException
- Thrown if the PluginMessage
was
not as expected.public boolean isHandshakeComplete()
true
if the handshake has been completed.public void setHandshakeComplete()
public boolean isForgeUser()
true
if the user is a forge user.Copyright © 2012–2020 SpigotMC. All rights reserved.