Class PulsePacketReceiveEvent
java.lang.Object
org.bukkit.event.Event
dev.pulsemc.pulse.api.events.network.PulsePacketReceiveEvent
- All Implemented Interfaces:
Cancellable
Triggered asynchronously when the server receives a packet from a client.
This event allows plugins to intercept, read, or cancel incoming packets (e.g., player movement, clicks, interactions) before the server processes them. WARNING: This event fires on Netty IO threads. It is fully asynchronous. Do not use Bukkit API methods here without proper synchronization!
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListGets the simple class name of the packet (e.g.booleanvoidsetCancelled(boolean cancel) voidReplaces the incoming packet with a modified one.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PulsePacketReceiveEvent
-
-
Method Details
-
getPlayer
-
getPacket
-
setPacket
Replaces the incoming packet with a modified one. -
getPacketName
Gets the simple class name of the packet (e.g. "ServerboundPlayerMovePacket") -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceCancellable
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-