Class PlayerSignals

java.lang.Object
me.tamkungz.signals.bukkit.event.PlayerSignals

public final class PlayerSignals extends Object
Shortcuts for common Bukkit player events, reached with BukkitSignals#players().

Each method is the same as EventSignalSource.on(Class) for the named event class; anything not listed here is still available through that method.

  • Constructor Details

    • PlayerSignals

      public PlayerSignals(EventSignalSource source)
      Creates the shortcuts; prefer BukkitSignals#players().
      Parameters:
      source - where the signals come from
  • Method Details

    • login

      public EventSignalBuilder<org.bukkit.event.player.PlayerLoginEvent> login()
      Listens to PlayerLoginEvent.

      Bukkit fires this while the player is still logging in, before PlayerJoinEvent; it is the place to deny a login.

      Returns:
      a builder for priority and cancellation options
    • join

      public EventSignalBuilder<org.bukkit.event.player.PlayerJoinEvent> join()
      Listens to PlayerJoinEvent.
      Returns:
      a builder for priority and cancellation options
    • quit

      public EventSignalBuilder<org.bukkit.event.player.PlayerQuitEvent> quit()
      Listens to PlayerQuitEvent.
      Returns:
      a builder for priority and cancellation options
    • kick

      public EventSignalBuilder<org.bukkit.event.player.PlayerKickEvent> kick()
      Listens to PlayerKickEvent.
      Returns:
      a builder for priority and cancellation options
    • move

      public EventSignalBuilder<org.bukkit.event.player.PlayerMoveEvent> move()
      Listens to PlayerMoveEvent.
      Returns:
      a builder for priority and cancellation options
    • teleport

      public EventSignalBuilder<org.bukkit.event.player.PlayerTeleportEvent> teleport()
      Listens to PlayerTeleportEvent.
      Returns:
      a builder for priority and cancellation options
    • interact

      public EventSignalBuilder<org.bukkit.event.player.PlayerInteractEvent> interact()
      Listens to PlayerInteractEvent.
      Returns:
      a builder for priority and cancellation options
    • death

      public EventSignalBuilder<org.bukkit.event.entity.PlayerDeathEvent> death()
      Listens to PlayerDeathEvent.
      Returns:
      a builder for priority and cancellation options
    • respawn

      public EventSignalBuilder<org.bukkit.event.player.PlayerRespawnEvent> respawn()
      Listens to PlayerRespawnEvent.
      Returns:
      a builder for priority and cancellation options
    • chat

      public EventSignalBuilder<org.bukkit.event.player.AsyncPlayerChatEvent> chat()
      Listens to AsyncPlayerChatEvent.

      Bukkit fires this event off the main thread, so listeners connected to it run on that thread. Paper 1.19 and newer also fire io.papermc.paper.event.player.AsyncChatEvent, which is available through EventSignalSource.on(Class).

      Returns:
      a builder for priority and cancellation options
    • changedWorld

      public EventSignalBuilder<org.bukkit.event.player.PlayerChangedWorldEvent> changedWorld()
      Listens to PlayerChangedWorldEvent.
      Returns:
      a builder for priority and cancellation options
    • command

      public EventSignalBuilder<org.bukkit.event.player.PlayerCommandPreprocessEvent> command()
      Listens to PlayerCommandPreprocessEvent.
      Returns:
      a builder for priority and cancellation options