Class PlayerPluginMessageEvent

java.lang.Object
net.minestom.server.event.player.PlayerPluginMessageEvent
All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, PlayerEvent, PlayerInstanceEvent

public class PlayerPluginMessageEvent extends Object implements PlayerInstanceEvent
Called when a player send ClientPluginMessagePacket.
  • Constructor Details

    • PlayerPluginMessageEvent

      public PlayerPluginMessageEvent(@NotNull @NotNull Player player, @NotNull @NotNull String identifier, @NotNull @org.jetbrains.annotations.NotNull byte[] message)
  • Method Details

    • getIdentifier

      @NotNull public @NotNull String getIdentifier()
      Gets the message identifier.
      Returns:
      the identifier
    • getMessage

      @NotNull public @org.jetbrains.annotations.NotNull byte[] getMessage()
      Gets the message data as a byte array.
      Returns:
      the message
    • getMessageString

      @NotNull public @NotNull String getMessageString()
      Gets the message data as a String.
      Returns:
      the message
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player