Class QueryMessageEvent
java.lang.Object
septogeddon.pluginquery.velocity.event.QueryMessageEvent
- All Implemented Interfaces:
com.velocitypowered.api.event.ResultedEvent<com.velocitypowered.api.event.ResultedEvent.GenericResult>
public class QueryMessageEvent
extends Object
implements com.velocitypowered.api.event.ResultedEvent<com.velocitypowered.api.event.ResultedEvent.GenericResult>
This class made to let you migrate from PluginMessaging easily. This event does not listen to
QueryContext.PLUGIN_MESSAGING_CHANNEL
- Author:
- Septogeddon
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
com.velocitypowered.api.event.ResultedEvent.ComponentResult, com.velocitypowered.api.event.ResultedEvent.GenericResult, com.velocitypowered.api.event.ResultedEvent.Result
-
Constructor Summary
ConstructorDescriptionQueryMessageEvent
(QueryConnection connection, String channel, byte[] message) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this event has been cancelled by previous lower priority listenervoid
cancelled
(boolean arg0) Cancel this eventThe channelbyte[]
getData()
Synonym ofgetMessage()
byte[]
The query messageSynonym ofgetSender()
com.velocitypowered.api.event.ResultedEvent.GenericResult
Get the result of this eventThe connection sendergetTag()
Synonym ofgetChannel()
void
setResult
(com.velocitypowered.api.event.ResultedEvent.GenericResult genericResult) Set the result of this event
-
Constructor Details
-
QueryMessageEvent
-
-
Method Details
-
getSender
The connection sender- Returns:
- See Also:
-
getReceiver
Synonym ofgetSender()
- Returns:
- See Also:
-
getChannel
The channel- Returns:
- See Also:
-
getTag
Synonym ofgetChannel()
- Returns:
- See Also:
-
getMessage
public byte[] getMessage()The query message- Returns:
- See Also:
-
getData
public byte[] getData()Synonym ofgetMessage()
- Returns:
- See Also:
-
cancelled
public boolean cancelled()Check if this event has been cancelled by previous lower priority listener -
cancelled
public void cancelled(boolean arg0) Cancel this event -
getResult
public com.velocitypowered.api.event.ResultedEvent.GenericResult getResult()Get the result of this event- Specified by:
getResult
in interfacecom.velocitypowered.api.event.ResultedEvent<com.velocitypowered.api.event.ResultedEvent.GenericResult>
- Returns:
-
setResult
public void setResult(com.velocitypowered.api.event.ResultedEvent.GenericResult genericResult) Set the result of this event- Specified by:
setResult
in interfacecom.velocitypowered.api.event.ResultedEvent<com.velocitypowered.api.event.ResultedEvent.GenericResult>
- Parameters:
genericResult
-
-