mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
Add missing configuration and game connection wrappers (#161)
This commit is contained in:
parent
ea64fba7f6
commit
cf4e3f609d
1 changed files with 17 additions and 0 deletions
|
@ -501,6 +501,23 @@ impl Connection<ServerboundLoginPacket, ClientboundLoginPacket> {
|
|||
) -> Result<GameProfile, ServerSessionServerError> {
|
||||
azalea_auth::sessionserver::serverside_auth(username, public_key, private_key, ip).await
|
||||
}
|
||||
|
||||
/// Change our state back to configuration.
|
||||
#[must_use]
|
||||
pub fn configuration(
|
||||
self,
|
||||
) -> Connection<ServerboundConfigurationPacket, ClientboundConfigurationPacket> {
|
||||
Connection::from(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl Connection<ServerboundConfigurationPacket, ClientboundConfigurationPacket> {
|
||||
/// Change our state from configuration to game. This is the state that's
|
||||
/// used when the client is actually in the world.
|
||||
#[must_use]
|
||||
pub fn game(self) -> Connection<ServerboundGamePacket, ClientboundGamePacket> {
|
||||
Connection::from(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl Connection<ClientboundConfigurationPacket, ServerboundConfigurationPacket> {
|
||||
|
|
Loading…
Add table
Reference in a new issue