Class SessionConnectEvent
java.lang.Object
org.geysermc.geyser.event.GeyserEvent
org.geysermc.geyser.event.events.network.SessionConnectEvent
- All Implemented Interfaces:
Cancellable
,EventSession
Triggered when a new session is connected
If cancelled then the session will be disconnected with
message
as the disconnection message-
Constructor Summary
ConstructorDescriptionSessionConnectEvent(@NonNull GeyserSession session, @NonNull String message)
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
@NonNull String
Message returned to client if connection is cancelled@NonNull GeyserSession
Return theGeyserSession
for this Eventint
hashCode()
boolean
Returns true if the event has been cancelledvoid
setCancelled(boolean cancelled)
Set if an event is cancelledvoid
setMessage(@NonNull String message)
Message returned to client if connection is cancelledtoString()
-
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 interfaceCancellable
- Returns:
- True if cancelled
-
getSession
Description copied from interface:EventSession
Return theGeyserSession
for this Event- Specified by:
getSession
in interfaceEventSession
- Returns:
- the current session
-
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 interfaceCancellable
- Parameters:
cancelled
- True if event should be cancelled.
-
setMessage
Message returned to client if connection is cancelled- Parameters:
message
- set the message
-
toString
- Overrides:
toString
in classGeyserEvent
-
equals
- Overrides:
equals
in classGeyserEvent
-
canEqual
- Overrides:
canEqual
in classGeyserEvent
-
hashCode
public int hashCode()- Overrides:
hashCode
in classGeyserEvent
-