Package net.minecraftforge.client.event
Class ClientPlayerNetworkEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ClientPlayerNetworkEvent
- Direct Known Subclasses:
ClientPlayerNetworkEvent.LoggedInEvent
,ClientPlayerNetworkEvent.LoggedOutEvent
,ClientPlayerNetworkEvent.RespawnEvent
public class ClientPlayerNetworkEvent
extends net.minecraftforge.eventbus.api.Event
Client side player connectivity events.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired when the client player logs in to the server.static class
Fired when the player logs out.static class
Fired when the player object respawns, such as dimension changes.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
ConstructorDescriptionClientPlayerNetworkEvent
(MultiPlayerGameMode multiPlayerGameMode, LocalPlayer player, Connection connection) -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
multiPlayerGameMode
-
player
-
connection
-
-
Constructor Details
-
ClientPlayerNetworkEvent
ClientPlayerNetworkEvent(MultiPlayerGameMode multiPlayerGameMode, LocalPlayer player, Connection connection)
-
-
Method Details
-
getMultiPlayerGameMode
- Returns:
- the player controller for the client side
-
getPlayer
- Returns:
- the player instance (if present - may be null)
-
getConnection
- Returns:
- the impl connection (if present - may be null)
-