Class ChannelMessageReceiveEvent
- java.lang.Object
-
- de.dytanic.cloudnet.driver.event.Event
-
- de.dytanic.cloudnet.driver.event.events.channel.ChannelMessageReceiveEvent
-
public final class ChannelMessageReceiveEvent extends Event
This event is being called whenever a channel message is received. You can send channel messages with the methods inCloudNetDriver.getMessenger().
-
-
Constructor Summary
Constructors Constructor Description ChannelMessageReceiveEvent(@NotNull ChannelMessage message, boolean query)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtocolBuffercreateBinaryResponse()@NotNull ProtocolBuffergetBuffer()@NotNull java.lang.StringgetChannel()@NotNull ChannelMessagegetChannelMessage()@NotNull de.dytanic.cloudnet.common.document.gson.JsonDocumentgetData()@Nullable java.lang.StringgetMessage()@Nullable ChannelMessagegetQueryResponse()@NotNull ChannelMessageSendergetSender()@NotNull java.util.Collection<ChannelMessageTarget>getTargets()booleanisQuery()voidsetBinaryResponse(@NotNull ProtocolBuffer buffer)voidsetJsonResponse(@NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument json)voidsetQueryResponse(@Nullable ChannelMessage queryResponse)-
Methods inherited from class de.dytanic.cloudnet.driver.event.Event
isShowDebug
-
-
-
-
Constructor Detail
-
ChannelMessageReceiveEvent
public ChannelMessageReceiveEvent(@NotNull @NotNull ChannelMessage message, boolean query)
-
-
Method Detail
-
getSender
@NotNull public @NotNull ChannelMessageSender getSender()
-
getTargets
@NotNull public @NotNull java.util.Collection<ChannelMessageTarget> getTargets()
-
getChannel
@NotNull public @NotNull java.lang.String getChannel()
-
getMessage
@Nullable public @Nullable java.lang.String getMessage()
-
getChannelMessage
@NotNull public @NotNull ChannelMessage getChannelMessage()
-
getData
@NotNull public @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument getData()
-
getBuffer
@NotNull public @NotNull ProtocolBuffer getBuffer()
-
isQuery
public boolean isQuery()
-
setJsonResponse
public void setJsonResponse(@NotNull @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument json)
-
setBinaryResponse
public void setBinaryResponse(@NotNull @NotNull ProtocolBuffer buffer)
-
createBinaryResponse
public ProtocolBuffer createBinaryResponse()
-
getQueryResponse
@Nullable public @Nullable ChannelMessage getQueryResponse()
-
setQueryResponse
public void setQueryResponse(@Nullable @Nullable ChannelMessage queryResponse)
-
-