Class ChatPrompt

java.lang.Object
redempt.redlib.misc.ChatPrompt
All Implemented Interfaces:
org.bukkit.event.Listener

public class ChatPrompt extends Object implements org.bukkit.event.Listener
  • Method Details

    • prompt

      public static void prompt(org.bukkit.entity.Player player, String prompt, boolean showCancelMessage, Consumer<String> onResponse, Consumer<ChatPrompt.CancelReason> onCancel)
      Prompts a player with callbacks for player response and cancelling
      Parameters:
      player - The player to prompt
      prompt - The prompt to send to the player, or null for no prompt
      showCancelMessage - Whether to show the cancel message to the player
      onResponse - The callback for when the player responds
      onCancel - The callback for when the prompt is cancelled
    • prompt

      public static void prompt(org.bukkit.entity.Player player, String prompt, boolean showCancelMessage, Consumer<String> onResponse)
      Prompts a player with callbacks for player response and cancelling
      Parameters:
      player - The player to prompt
      prompt - The prompt to send to the player, or null for no prompt
      showCancelMessage - Whether to show the cancel message to the player
      onResponse - The callback for when the player responds
    • prompt

      public static void prompt(org.bukkit.entity.Player player, String prompt, Consumer<String> onResponse)
      Prompts a player with callbacks for player response and cancelling
      Parameters:
      player - The player to prompt
      prompt - The prompt to send to the player, or null for no prompt
      onResponse - The callback for when the player responds
    • prompt

      public static void prompt(org.bukkit.entity.Player player, String prompt, Consumer<String> onResponse, Consumer<ChatPrompt.CancelReason> onCancel)
      Prompts a player with callbacks for player response and cancelling
      Parameters:
      player - The player to prompt
      prompt - The prompt to send to the player, or null for no prompt
      onResponse - The callback for when the player responds
      onCancel - The callback for when the prompt is cancelled
    • onChat

      public void onChat(org.bukkit.event.player.AsyncPlayerChatEvent e)
    • onLeave

      public void onLeave(org.bukkit.event.player.PlayerQuitEvent e)