Interface CancellableEvent
- All Known Implementing Classes:
PacketConfigReceiveEvent
,PacketConfigSendEvent
,PacketHandshakeReceiveEvent
,PacketHandshakeSendEvent
,PacketLoginReceiveEvent
,PacketLoginSendEvent
,PacketPlayReceiveEvent
,PacketPlaySendEvent
,PacketReceiveEvent
,PacketSendEvent
,PacketStatusReceiveEvent
,PacketStatusSendEvent
,ProtocolPacketEvent
,UserConnectEvent
public interface CancellableEvent
Every event that supports cancellation should implement this interface.
PacketEvents' event system lets the highest priority listener be have the highest priority
in deciding whether the event will cancel.
This means an event with a lower priority than the higher priority one would not be able to decide.
Cancelling the event means the action assosiated with the event will be cancelled.
For example, cancelling the
PacketReceiveEvent
will prevent minecraft from processing the incoming packet.- Since:
- 1.7
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
This method returns if the event will be cancelled.void
setCancelled
(boolean val) Cancel or proceed with the event.
-
Method Details
-
isCancelled
boolean isCancelled()This method returns if the event will be cancelled.- Returns:
- Will the event be cancelled.
-
setCancelled
void setCancelled(boolean val) Cancel or proceed with the event.- Parameters:
val
- Is the event cancelled
-