Class ServerLoginPluginMessageEvent.ResponseResult
java.lang.Object
com.velocitypowered.api.event.player.ServerLoginPluginMessageEvent.ResponseResult
- All Implemented Interfaces:
ResultedEvent.Result
- Enclosing class:
ServerLoginPluginMessageEvent
public static class ServerLoginPluginMessageEvent.ResponseResult
extends Object
implements ResultedEvent.Result
The result class, containing a response to the login plugin message sent by the server.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]Returns the response to the message.inthashCode()booleanReturns whether or not the event is allowed to proceed.reply(byte[] response) Returns a result with a reply to the server's login plugin message.toString()unknown()Returns a result indicating that this login plugin message was not handled by the proxy.
-
Method Details
-
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
-
getResponse
public byte[] getResponse()Returns the response to the message.- Returns:
- the response to the message
- Throws:
IllegalStateException- if there is no reply (an unknown message)
-
unknown
Returns a result indicating that this login plugin message was not handled by the proxy.- Returns:
- the unknown response result
-
reply
Returns a result with a reply to the server's login plugin message.- Parameters:
response- the response bytes to send- Returns:
- a response result containing the response data
-
equals
-
hashCode
public int hashCode() -
toString
-