Package net.minecraftforge.client.event
Class ClientPlayerNetworkEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ClientPlayerNetworkEvent
- Direct Known Subclasses:
ClientPlayerNetworkEvent.Clone
,ClientPlayerNetworkEvent.LoggingIn
,ClientPlayerNetworkEvent.LoggingOut
public abstract class ClientPlayerNetworkEvent
extends net.minecraftforge.eventbus.api.Event
Fired for different client connectivity events.
See the various subclasses to listen for specific events.
These events are fired on the main Forge event bus, only on the logical client.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired when the client player respawns, creating a new player instance to replace the old player instance.static class
Fired when the client player logs in to the server.static class
Fired when the client player logs out.Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Connection
private final MultiPlayerGameMode
private final LocalPlayer
-
Constructor Summary
ModifierConstructorDescriptionprotected
ClientPlayerNetworkEvent
(MultiPlayerGameMode multiPlayerGameMode, LocalPlayer player, Connection connection) -
Method Summary
Modifier and TypeMethodDescriptionReturns the network connection for the player.Returns the multiplayer game mode controller for the player.Returns the player instance.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
multiPlayerGameMode
-
player
-
connection
-
-
Constructor Details
-
ClientPlayerNetworkEvent
@Internal protected ClientPlayerNetworkEvent(MultiPlayerGameMode multiPlayerGameMode, LocalPlayer player, Connection connection)
-
-
Method Details
-
getMultiPlayerGameMode
Returns the multiplayer game mode controller for the player.- Returns:
- the multiplayer game mode controller for the player
-
getPlayer
Returns the player instance.- Returns:
- the player instance
-
getConnection
Returns the network connection for the player.- Returns:
- the network connection for the player
-