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
Nested Classes Modifier and Type Class Description static class
ClientPlayerNetworkEvent.LoggedInEvent
Fired when the client player logs in to the server.static class
ClientPlayerNetworkEvent.LoggedOutEvent
Fired when the player logs out.static class
ClientPlayerNetworkEvent.RespawnEvent
Fired when the player object respawns, such as dimension changes.
-
Field Summary
Fields Modifier and Type Field Description private PlayerController
controller
private NetworkManager
networkManager
private ClientPlayerEntity
player
-
Constructor Summary
Constructors Constructor Description ClientPlayerNetworkEvent(PlayerController controller, ClientPlayerEntity player, NetworkManager networkManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayerController
getController()
NetworkManager
getNetworkManager()
ClientPlayerEntity
getPlayer()
-
-
-
Field Detail
-
controller
private final PlayerController controller
-
player
private final ClientPlayerEntity player
-
networkManager
private final NetworkManager networkManager
-
-
Constructor Detail
-
ClientPlayerNetworkEvent
ClientPlayerNetworkEvent(PlayerController controller, ClientPlayerEntity player, NetworkManager networkManager)
-
-
Method Detail
-
getController
@Nullable public PlayerController getController()
- Returns:
- the player controller for the client side
-
getPlayer
@Nullable public ClientPlayerEntity getPlayer()
- Returns:
- the player instance (if present - may be null)
-
getNetworkManager
@Nullable public NetworkManager getNetworkManager()
- Returns:
- the network connection (if present - may be null)
-
-