Class PreTransferEvent
java.lang.Object
com.velocitypowered.api.event.connection.PreTransferEvent
- All Implemented Interfaces:
ResultedEvent<PreTransferEvent.TransferResult>
@AwaitingEvent
@Experimental
public final class PreTransferEvent
extends Object
implements ResultedEvent<PreTransferEvent.TransferResult>
This event is executed before sending a player to another host,
either by the backend server or by a plugin using
the
Player.transferToHost(InetSocketAddress)
method.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Transfer Result of a player to another host.Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the result associated with this event.player()
void
Sets the result of this event.
-
Constructor Details
-
PreTransferEvent
-
-
Method Details
-
player
-
originalAddress
-
getResult
Description copied from interface:ResultedEvent
Returns the result associated with this event.- Specified by:
getResult
in interfaceResultedEvent<PreTransferEvent.TransferResult>
- Returns:
- the result of this event
-
setResult
Description copied from interface:ResultedEvent
Sets the result of this event. The result must be non-null.- Specified by:
setResult
in interfaceResultedEvent<PreTransferEvent.TransferResult>
- Parameters:
result
- the new result
-