Class ClientPlayerNetworkEvent.LoggingOut
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent
net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.LoggingOut
- Enclosing class:
ClientPlayerNetworkEvent
Fired when the client player logs out. This event may also fire when a new integrated server is being created.
This event is not
, and does not
invalid reference
cancellable
.invalid reference
have a result
This event is fired on the main Forge event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent
ClientPlayerNetworkEvent.Clone, ClientPlayerNetworkEvent.LoggingIn, ClientPlayerNetworkEvent.LoggingOut
-
Constructor Summary
ConstructorDescriptionLoggingOut
(@Nullable MultiPlayerGameMode controller, @Nullable LocalPlayer player, @Nullable Connection networkManager) -
Method Summary
Modifier and TypeMethodDescription@Nullable Connection
Returns the network connection for the player, may benull
.@Nullable MultiPlayerGameMode
Returns the multiplayer game mode controller for the player, may benull
.@Nullable LocalPlayer
Returns the player instance, may benull
.
-
Constructor Details
-
LoggingOut
@Internal public LoggingOut(@Nullable @Nullable MultiPlayerGameMode controller, @Nullable @Nullable LocalPlayer player, @Nullable @Nullable Connection networkManager)
-
-
Method Details
-
getMultiPlayerGameMode
Returns the multiplayer game mode controller for the player, may benull
.. This may benull
in certain situations such as the creating a new integrated server (singleplayer world) or connecting to a multiplayer server.- Overrides:
getMultiPlayerGameMode
in classClientPlayerNetworkEvent
- Returns:
- the multiplayer game mode controller for the player, may be
null
-
getPlayer
Returns the player instance, may benull
.. This may benull
in certain situations such as the creating a new integrated server (singleplayer world) or connecting to a multiplayer server.- Overrides:
getPlayer
in classClientPlayerNetworkEvent
- Returns:
- the player instance, may be
null
-
getConnection
Returns the network connection for the player, may benull
.. This may benull
in certain situations such as the creating a new integrated server (singleplayer world) or connecting to a multiplayer server.- Overrides:
getConnection
in classClientPlayerNetworkEvent
- Returns:
- the network connection for the player, may be
null
-