Package net.minestom.server.event.player
Class PlayerPluginMessageEvent
java.lang.Object
net.minestom.server.event.player.PlayerPluginMessageEvent
- All Implemented Interfaces:
Event
,EntityEvent
,EntityInstanceEvent
,InstanceEvent
,PlayerEvent
,PlayerInstanceEvent
Called when a player send
ClientPluginMessagePacket
.-
Constructor Summary
ConstructorDescriptionPlayerPluginMessageEvent
(@NotNull Player player, @NotNull String identifier, @org.jetbrains.annotations.NotNull byte[] message) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.event.trait.EntityInstanceEvent
getInstance
Methods inherited from interface net.minestom.server.event.trait.PlayerEvent
getEntity
-
Constructor Details
-
PlayerPluginMessageEvent
-
-
Method Details
-
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
Gets the message data as a String.- Returns:
- the message
-
getPlayer
Description copied from interface:PlayerEvent
Gets the player.- Specified by:
getPlayer
in interfacePlayerEvent
- Returns:
- the player
-