Class PreTransferEvent.TransferResult

java.lang.Object
com.velocitypowered.api.event.connection.PreTransferEvent.TransferResult
All Implemented Interfaces:
ResultedEvent.Result
Enclosing class:
PreTransferEvent

public static class PreTransferEvent.TransferResult extends Object implements ResultedEvent.Result
Transfer Result of a player to another host.
  • Method Details

    • allowed

      public static PreTransferEvent.TransferResult allowed()
      Allows the transfer to proceed to the originally specified address.
      Returns:
      an allowed result
    • denied

      public static PreTransferEvent.TransferResult denied()
      Denies the transfer attempt.
      Returns:
      a denied result
    • transferTo

      public static PreTransferEvent.TransferResult transferTo(InetSocketAddress address)
      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.Result
      Returns 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:
      isAllowed in interface ResultedEvent.Result
      Returns:
      whether or not the event is allowed to proceed
    • address

      @Nullable public @Nullable InetSocketAddress address()
      Returns the destination address for the transfer, if overridden.
      Returns:
      the overridden address or null if not specified