pub enum ServerboundPackets {
Show 14 variants None, LegacyPing, Handshake(HandshakePacket), StatusRequest(StatusRequestPacket), PingRequest(PingPacket), LoginStart(LoginStart), LoginEncryptionResponse(LoginEncryptionResponse), LoginAcknowledged, ClientInformation(ClientInformation), ConfigurationPluginMessage(ServerboundPluginMessage), AckFinishConfiguration, KeepAlive(KeepAliveResponse), Pong, ResoucePackResponse(ResoucePackResponse),
}
Expand description

A list of all Serverbound Packets that can be received (Client to Server)

Variants§

§

None

Variant when no packet was received

§

LegacyPing

Information that a legacy ping was received, no information stored, because none is needed

§

Handshake(HandshakePacket)

Handshake initialization Packet

§Note

Every Connection that is not a legacy connection has to start with this packet to tell the server if the connection is of type Status or Login

§

StatusRequest(StatusRequestPacket)

Packet to request the player count, max players and motd

§

PingRequest(PingPacket)

Packet to measure the Ping, should be responded with the same id

§

LoginStart(LoginStart)

Packet to start the login procedure

§

LoginEncryptionResponse(LoginEncryptionResponse)

Packet that sends encrypted authentication data for the server to autheticate the minecraft account with the official authentication service

§

LoginAcknowledged

Packet that assures the server that the LoginSuccess was received

§

ClientInformation(ClientInformation)

First packet sent to the server after switching to Configuration

§

ConfigurationPluginMessage(ServerboundPluginMessage)

Plugin message packet for the configuration phase

§

AckFinishConfiguration

Packet that assures the server that the FinishConfiguration Packet was received

§

KeepAlive(KeepAliveResponse)

Keep Alive Packet, needed to be received to not get disconnected

§

Pong

Answer to a ping packet requested in the Configuration phase

§

ResoucePackResponse(ResoucePackResponse)

Packet to respond to AddResourcePack or RemoveResourcePack to tell the server how the requested Action was processed and if it was successful

Implementations§

source§

impl ServerboundPackets

source

pub async fn read<'a>( reader: &mut BufReader<ReadHalf<'a>>, state: &State ) -> Result<Self>

A read function to read a Serverbound packet from and BufReader<ReadHalf>

§Returns

Returns a result containing the read packet. If an error occurs it gets returned

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.