接口的使用
org.bukkit.conversations.Prompt
-
org.bukkit.conversations中Prompt的使用
修饰符和类型类说明class
BooleanPrompt是那些需要用户判断操作是与否的提示的基类.class
FixedSetPrompt is the base class for any prompt that requires a fixed set response from the user.class
MessagePrompt is the base class for any prompt that only displays a message to the user and requires no input.class
NumericPrompt is the base class for any prompt that requires aNumber
response from the user.class
PlayerNamePrompt is the base class for any prompt that requires the player to enter another player's name.class
RegexPrompt is the base class for any prompt that requires an input validated by a regular expression.class
StringPrompt is the base class for any prompt that accepts an arbitrary string from the user.class
ValidatingPrompt is the base class for any prompt that requires validation.修饰符和类型字段说明protected Prompt
Conversation.currentPrompt
static final Prompt
Prompt.END_OF_CONVERSATION
A convenience constant for indicating the end of a conversation.protected Prompt
ConversationFactory.firstPrompt
修饰符和类型方法说明MessagePrompt.acceptInput
(ConversationContext context, String input) Accepts and ignores any user input, returning the next prompt in the prompt graph instead.Prompt.acceptInput
(ConversationContext context, String input) Accepts and processes input from the user.ValidatingPrompt.acceptInput
(ConversationContext context, String input) Accepts and processes input from the user and validates it.protected abstract Prompt
BooleanPrompt.acceptValidatedInput
(ConversationContext context, boolean input) 您可以重写这个方法,根据用户对提示的响应来执行对应的操作.protected Prompt
BooleanPrompt.acceptValidatedInput
(ConversationContext context, String input) protected abstract Prompt
NumericPrompt.acceptValidatedInput
(ConversationContext context, Number input) Override this method to perform some action with the user's integer response.protected Prompt
NumericPrompt.acceptValidatedInput
(ConversationContext context, String input) protected Prompt
PlayerNamePrompt.acceptValidatedInput
(ConversationContext context, String input) protected abstract Prompt
PlayerNamePrompt.acceptValidatedInput
(ConversationContext context, Player input) Override this method to perform some action with the user's player name response.protected abstract Prompt
ValidatingPrompt.acceptValidatedInput
(ConversationContext context, String input) Override this method to accept and processes the validated input from the user.protected abstract Prompt
MessagePrompt.getNextPrompt
(ConversationContext context) Override this method to return the next prompt in the prompt graph.修饰符和类型方法说明ConversationFactory.withFirstPrompt
(Prompt firstPrompt) Sets the first prompt to use in all generated conversations.限定符构造器说明Conversation
(Plugin plugin, Conversable forWhom, Prompt firstPrompt) Initializes a new Conversation.Conversation
(Plugin plugin, Conversable forWhom, Prompt firstPrompt, Map<Object, Object> initialSessionData) Initializes a new Conversation.