Interface PlayerEvents
public interface PlayerEvents
Player-related event provider.
-
Method Summary
Modifier and TypeMethodDescription@NotNull EventSubscription<org.bukkit.event.player.PlayerJoinEvent> Shorthand to listen to player join events.@NotNull EventSubscription<org.bukkit.event.player.PlayerInteractEvent> Shorthand to listen to player left-click actions (blocks or air).@NotNull EventSubscription<org.bukkit.event.player.PlayerInteractEvent> rightClick(@NotNull Consumer<org.bukkit.event.player.PlayerInteractEvent> handler) Shorthand to listen to player right-click actions (blocks or air).
-
Method Details
-
join
@NotNull @NotNull EventSubscription<org.bukkit.event.player.PlayerJoinEvent> join(@NotNull @NotNull Consumer<org.bukkit.event.player.PlayerJoinEvent> handler) Shorthand to listen to player join events.- Parameters:
handler- the event handler- Returns:
- the active event subscription
-
rightClick
@NotNull @NotNull EventSubscription<org.bukkit.event.player.PlayerInteractEvent> rightClick(@NotNull @NotNull Consumer<org.bukkit.event.player.PlayerInteractEvent> handler) Shorthand to listen to player right-click actions (blocks or air).- Parameters:
handler- the event handler- Returns:
- the active event subscription
-
leftClick
@NotNull @NotNull EventSubscription<org.bukkit.event.player.PlayerInteractEvent> leftClick(@NotNull @NotNull Consumer<org.bukkit.event.player.PlayerInteractEvent> handler) Shorthand to listen to player left-click actions (blocks or air).- Parameters:
handler- the event handler- Returns:
- the active event subscription
-