Class PreTransferEvent.TransferResult
java.lang.Object
com.velocitypowered.api.event.connection.PreTransferEvent.TransferResult
- All Implemented Interfaces:
ResultedEvent.Result
- Enclosing class:
PreTransferEvent
Transfer Result of a player to another host.
-
Method Summary
Modifier and TypeMethodDescription@Nullable InetSocketAddressaddress()Returns the destination address for the transfer, if overridden.allowed()Allows the transfer to proceed to the originally specified address.denied()Denies the transfer attempt.booleanReturns whether or not the event is allowed to proceed.transferTo(InetSocketAddress address) Sets the result of transfer to a specific host.
-
Method Details
-
allowed
Allows the transfer to proceed to the originally specified address.- Returns:
- an allowed result
-
denied
Denies the transfer attempt.- Returns:
- a denied result
-
transferTo
Sets the result of transfer to a specific host.- Parameters:
address- the address specified- Returns:
- a new TransferResult
-
isAllowed
public boolean isAllowed()Description copied from interface:ResultedEvent.ResultReturns whether or not the event is allowed to proceed. Plugins may choose to skip denied events, and the proxy will respect the result of this method.- Specified by:
isAllowedin interfaceResultedEvent.Result- Returns:
- whether or not the event is allowed to proceed
-
address
Returns the destination address for the transfer, if overridden.- Returns:
- the overridden address or null if not specified
-