Class FakePlayerConnection
java.lang.Object
net.minestom.server.network.player.PlayerConnection
net.minestom.server.network.player.FakePlayerConnection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull SocketAddressGets the remote address of the client.voidsendPacket(@NotNull SendablePacket packet) Serializes the packet and send it to the client.voidChanges the player linked to this connection.Methods inherited from class net.minestom.server.network.player.PlayerConnection
disconnect, getConnectionState, getIdentifier, getPlayer, getProtocolVersion, getServerAddress, getServerPort, isOnline, playerPublicKey, sendPackets, sendPackets, setConnectionState, setPlayerPublicKey, toString
-
Constructor Details
-
FakePlayerConnection
public FakePlayerConnection()
-
-
Method Details
-
sendPacket
Description copied from class:PlayerConnectionSerializes the packet and send it to the client.- Specified by:
sendPacketin classPlayerConnection- Parameters:
packet- the packet to send
-
getRemoteAddress
Description copied from class:PlayerConnectionGets the remote address of the client.- Specified by:
getRemoteAddressin classPlayerConnection- Returns:
- the remote address
-
getFakePlayer
-
setPlayer
Description copied from class:PlayerConnectionChanges the player linked to this connection.WARNING: unsafe.
- Overrides:
setPlayerin classPlayerConnection- Parameters:
player- the player
-