Package net.minecraftforge.client.event
Class ClientPlayerNetworkEvent.Clone
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ClientPlayerNetworkEvent
net.minecraftforge.client.event.ClientPlayerNetworkEvent.Clone
- Enclosing class:
ClientPlayerNetworkEvent
Fired when the client player respawns, creating a new player instance to replace the old player instance.
This event is not cancellable, and does not 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.minecraftforge.client.event.ClientPlayerNetworkEvent
ClientPlayerNetworkEvent.Clone, ClientPlayerNetworkEvent.LoggingIn, ClientPlayerNetworkEvent.LoggingOut
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
-
Constructor Summary
ConstructorDescriptionClone
(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager) -
Method Summary
Modifier and TypeMethodDescriptionReturns the newly created player instance.Returns the previous player instance.Returns the newly created player instance.Methods inherited from class net.minecraftforge.client.event.ClientPlayerNetworkEvent
getConnection, getMultiPlayerGameMode
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
oldPlayer
-
-
Constructor Details
-
Clone
@Internal public Clone(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager)
-
-
Method Details
-
getOldPlayer
Returns the previous player instance.- Returns:
- the previous player instance
-
getNewPlayer
Returns the newly created player instance.- Returns:
- the newly created player instance
-
getPlayer
Returns the newly created player instance.- Overrides:
getPlayer
in classClientPlayerNetworkEvent
- Returns:
- the newly created player instance
- See Also:
-