Package redempt.redlib.misc
Class ChatPrompt
java.lang.Object
redempt.redlib.misc.ChatPrompt
- All Implemented Interfaces:
org.bukkit.event.Listener
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidonChat(org.bukkit.event.player.AsyncPlayerChatEvent e) voidonLeave(org.bukkit.event.player.PlayerQuitEvent e) static voidprompt(org.bukkit.entity.Player player, String prompt, boolean showCancelMessage, Consumer<String> onResponse) Prompts a player with callbacks for player response and cancellingstatic voidprompt(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 cancellingstatic voidPrompts a player with callbacks for player response and cancellingstatic voidprompt(org.bukkit.entity.Player player, String prompt, Consumer<String> onResponse, Consumer<ChatPrompt.CancelReason> onCancel) Prompts a player with callbacks for player response and cancelling
-
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 promptprompt- The prompt to send to the player, or null for no promptshowCancelMessage- Whether to show the cancel message to the playeronResponse- The callback for when the player respondsonCancel- 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 promptprompt- The prompt to send to the player, or null for no promptshowCancelMessage- Whether to show the cancel message to the playeronResponse- 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 promptprompt- The prompt to send to the player, or null for no promptonResponse- 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 promptprompt- The prompt to send to the player, or null for no promptonResponse- The callback for when the player respondsonCancel- 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)
-