Class SessionConnectEvent

java.lang.Object
org.geysermc.geyser.event.GeyserEvent
org.geysermc.geyser.event.events.network.SessionConnectEvent
All Implemented Interfaces:
Cancellable, EventSession

public class SessionConnectEvent extends GeyserEvent implements Cancellable, EventSession
Triggered when a new session is connected If cancelled then the session will be disconnected with message as the disconnection message
  • Constructor Details

    • SessionConnectEvent

      public SessionConnectEvent(@NonNull @NonNull GeyserSession session, @NonNull @NonNull String message)
  • Method Details

    • isCancelled

      public boolean isCancelled()
      Description copied from interface: Cancellable
      Returns true if the event has been cancelled
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      True if cancelled
    • getSession

      @NonNull public @NonNull GeyserSession getSession()
      Description copied from interface: EventSession
      Return the GeyserSession for this Event
      Specified by:
      getSession in interface EventSession
      Returns:
      the current session
    • getMessage

      @NonNull public @NonNull String getMessage()
      Message returned to client if connection is cancelled
      Returns:
      get current message
    • setCancelled

      public void setCancelled(boolean cancelled)
      Description copied from interface: Cancellable
      Set if an event is cancelled
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancelled - True if event should be cancelled.
    • setMessage

      public void setMessage(@NonNull @NonNull String message)
      Message returned to client if connection is cancelled
      Parameters:
      message - set the message
    • toString

      public String toString()
      Overrides:
      toString in class GeyserEvent
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class GeyserEvent
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class GeyserEvent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class GeyserEvent