Package net.minestom.server.event.player
Class PlayerPluginMessageEvent
java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.player.PlayerPluginMessageEvent
public class PlayerPluginMessageEvent extends Event
Called when a player send
ClientPluginMessagePacket
.-
Constructor Summary
Constructors Constructor Description PlayerPluginMessageEvent(Player player, java.lang.String identifier, byte[] message)
-
Method Summary
Modifier and Type Method Description java.lang.String
getIdentifier()
Gets the message identifier.byte[]
getMessage()
Gets the message data as a byte array.java.lang.String
getMessageString()
Gets the message data as a String.Player
getPlayer()
Gets the player who sent the message.
-
Constructor Details
-
PlayerPluginMessageEvent
public PlayerPluginMessageEvent(@NotNull Player player, @NotNull java.lang.String identifier, @NotNull byte[] message)
-
-
Method Details
-
getPlayer
Gets the player who sent the message.- Returns:
- the player
-
getIdentifier
@NotNull public java.lang.String getIdentifier()Gets the message identifier.- Returns:
- the identifier
-
getMessage
@NotNull public byte[] getMessage()Gets the message data as a byte array.- Returns:
- the message
-
getMessageString
@NotNull public java.lang.String getMessageString()Gets the message data as a String.- Returns:
- the message
-