@ThreadSafe public class PlayerConnection extends ClientConnection
address, channel, clientData, compressionEnabled, decryptCipher, encryptCipher, encryptionEnabled, loginKeyPair, sharedSecret, SR, stage, verificationToken
Modifier and Type | Method and Description |
---|---|
static PlayerConnection |
connection(InetSocketAddress address) |
static PlayerConnection |
createPlayerConnection(ClientConnection connection,
TridentPlayer player) |
void |
handleKeepAlive(PacketPlayInKeepAlive keepAlive) |
boolean |
hasSentKeepAlive()
Checks the hasSent flag to see if the player has sent the keep alive packet
|
TridentPlayer |
player()
Gets the player that has this connection
|
void |
resetReadCounter() |
void |
sendKeepAlive() |
void |
sendPacket(Packet packet)
Sends protocol data through the client stream
|
address, channel, connection, decrypt, enableCompression, enableEncryption, encrypt, generateToken, getConnection, isCompressionEnabled, isEncryptionEnabled, isLoggedIn, loginKeyPair, logout, registerConnection, setLoginKeyPair, setStage, setUuid, sharedSecret, stage, verificationToken
public static PlayerConnection createPlayerConnection(ClientConnection connection, TridentPlayer player)
public static PlayerConnection connection(InetSocketAddress address)
public TridentPlayer player()
@InternalUseOnly public void sendKeepAlive()
@InternalUseOnly public void handleKeepAlive(PacketPlayInKeepAlive keepAlive)
@InternalUseOnly public void resetReadCounter()
public void sendPacket(Packet packet)
ClientConnection
sendPacket
in class ClientConnection
packet
- the packet to send, encoded and written to the streampublic boolean hasSentKeepAlive()
true
to represent the player keep alive has been sentCopyright © 2016. All rights reserved.