Package com.ohacd.matchbox.api.events
Class PlayerJoinEvent
java.lang.Object
com.ohacd.matchbox.api.MatchboxEvent
com.ohacd.matchbox.api.events.PlayerJoinEvent
Event fired when a player joins a game session.
- Since:
- 0.9.5
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerJoinEvent(@NotNull String sessionName, @NotNull org.bukkit.entity.Player player) Creates a new player join event. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatch(@NotNull MatchboxEventListener listener) Dispatches this event to the appropriate listener method.@NotNull org.bukkit.entity.PlayerGets the player who joined the session.@NotNull StringGets the name of the session the player joined.Methods inherited from class com.ohacd.matchbox.api.MatchboxEvent
getTimestamp, toString
-
Constructor Details
-
PlayerJoinEvent
public PlayerJoinEvent(@NotNull @NotNull String sessionName, @NotNull @NotNull org.bukkit.entity.Player player) Creates a new player join event.- Parameters:
sessionName- the session nameplayer- the player who joined
-
-
Method Details
-
dispatch
Description copied from class:MatchboxEventDispatches this event to the appropriate listener method.This method uses the visitor pattern to call the correct handler method based on the concrete event type. Implementing classes should call
super.dispatch(listener)as the first line.- Specified by:
dispatchin classMatchboxEvent- Parameters:
listener- the listener to dispatch to
-
getSessionName
Gets the name of the session the player joined.- Returns:
- the session name
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer()Gets the player who joined the session.- Returns:
- the player
-