Class NetworkChannelInitEvent

All Implemented Interfaces:
Cancelable

public final class NetworkChannelInitEvent extends NetworkEvent implements Cancelable
An event being fired when a network channel get initialized either on the client or server side.
Since:
4.0
  • Field Details

    • channelType

      private final ChannelType channelType
    • cancelled

      private boolean cancelled
  • Constructor Details

  • Method Details

    • channelType

      @NonNull public @NonNull ChannelType channelType()
      Get the type of channel getting initialized.
      Returns:
      the type of channel getting initialized.
    • cancelled

      public boolean cancelled()
      Gets the cancellation state of the event. A cancelled event will stop the execution of the representing change in the system, but will be passed to all event listeners nevertheless.
      Specified by:
      cancelled in interface Cancelable
      Returns:
      true if this is cancelled, false otherwise.
    • cancelled

      public void cancelled(boolean cancelled)
      Marks this event as cancelled and stops the execution of the representing change in the system. The event will be passed to other event listeners down the line anyway.
      Specified by:
      cancelled in interface Cancelable
      Parameters:
      cancelled - true if this event should get marked as cancelled, false otherwise.