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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerPluginMessageEvent

      public PlayerPluginMessageEvent​(@NotNull Player player, @NotNull java.lang.String identifier, @NotNull byte[] message)
  • Method Details

    • getPlayer

      @NotNull public Player 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