程序包 | 说明 |
---|---|
org.bukkit.conversations |
致力于简化玩家与插件的直接通信的类(玩家与插件的对话,典型的场景比如操作的确认、提供插件所需数据).
|
限定符和类型 | 字段和说明 |
---|---|
protected ConversationContext |
Conversation.context |
限定符和类型 | 方法和说明 |
---|---|
ConversationContext |
Conversation.getContext()
Returns the Conversation's
ConversationContext . |
ConversationContext |
ConversationAbandonedEvent.getContext()
获取这个被终止的会话的上下文.
|
限定符和类型 | 方法和说明 |
---|---|
Prompt |
MessagePrompt.acceptInput(ConversationContext context,
java.lang.String input)
Accepts and ignores any user input, returning the next prompt in the
prompt graph instead.
|
Prompt |
Prompt.acceptInput(ConversationContext context,
java.lang.String input)
Accepts and processes input from the user.
|
Prompt |
ValidatingPrompt.acceptInput(ConversationContext context,
java.lang.String input)
Accepts and processes input from the user and validates it.
|
protected abstract Prompt |
BooleanPrompt.acceptValidatedInput(ConversationContext context,
boolean input)
您可以重写这个方法,根据用户对提示的响应来执行对应的操作.
|
protected abstract Prompt |
NumericPrompt.acceptValidatedInput(ConversationContext context,
java.lang.Number input)
Override this method to perform some action with the user's integer
response.
|
protected abstract Prompt |
PlayerNamePrompt.acceptValidatedInput(ConversationContext context,
Player input)
Override this method to perform some action with the user's player name
response.
|
protected Prompt |
PlayerNamePrompt.acceptValidatedInput(ConversationContext context,
java.lang.String input) |
protected Prompt |
NumericPrompt.acceptValidatedInput(ConversationContext context,
java.lang.String input) |
protected Prompt |
BooleanPrompt.acceptValidatedInput(ConversationContext context,
java.lang.String input) |
protected abstract Prompt |
ValidatingPrompt.acceptValidatedInput(ConversationContext context,
java.lang.String input)
Override this method to accept and processes the validated input from
the user.
|
boolean |
StringPrompt.blocksForInput(ConversationContext context)
Ensures that the prompt waits for the user to provide input.
|
boolean |
MessagePrompt.blocksForInput(ConversationContext context)
Message prompts never wait for user input before continuing.
|
boolean |
Prompt.blocksForInput(ConversationContext context)
Checks to see if this prompt implementation should wait for user input
or immediately display the next prompt.
|
boolean |
ValidatingPrompt.blocksForInput(ConversationContext context)
Ensures that the prompt waits for the user to provide input.
|
boolean |
ConversationCanceller.cancelBasedOnInput(ConversationContext context,
java.lang.String input)
根据用户的输入反馈取消一个会话.
|
boolean |
ManuallyAbandonedConversationCanceller.cancelBasedOnInput(ConversationContext context,
java.lang.String input) |
boolean |
ExactMatchConversationCanceller.cancelBasedOnInput(ConversationContext context,
java.lang.String input) |
boolean |
InactivityConversationCanceller.cancelBasedOnInput(ConversationContext context,
java.lang.String input) |
protected java.lang.String |
NumericPrompt.getFailedValidationText(ConversationContext context,
java.lang.Number invalidInput)
Optionally override this method to display an additional message if the
user enters an invalid numeric input.
|
protected java.lang.String |
NumericPrompt.getFailedValidationText(ConversationContext context,
java.lang.String invalidInput) |
protected java.lang.String |
ValidatingPrompt.getFailedValidationText(ConversationContext context,
java.lang.String invalidInput)
Optionally override this method to display an additional message if the
user enters an invalid input.
|
protected java.lang.String |
NumericPrompt.getInputNotNumericText(ConversationContext context,
java.lang.String invalidInput)
Optionally override this method to display an additional message if the
user enters an invalid number.
|
protected abstract Prompt |
MessagePrompt.getNextPrompt(ConversationContext context)
Override this method to return the next prompt in the prompt graph.
|
java.lang.String |
ConversationPrefix.getPrefix(ConversationContext context)
Gets the prefix to use before each message to the player.
|
java.lang.String |
PluginNameConversationPrefix.getPrefix(ConversationContext context)
Prepends each conversation message with the plugin name.
|
java.lang.String |
NullConversationPrefix.getPrefix(ConversationContext context)
Prepends each conversation message with an empty string.
|
java.lang.String |
Prompt.getPromptText(ConversationContext context)
Gets the text to display to the user when this prompt is first
presented.
|
protected boolean |
FixedSetPrompt.isInputValid(ConversationContext context,
java.lang.String input) |
protected boolean |
PlayerNamePrompt.isInputValid(ConversationContext context,
java.lang.String input) |
protected boolean |
NumericPrompt.isInputValid(ConversationContext context,
java.lang.String input) |
protected boolean |
RegexPrompt.isInputValid(ConversationContext context,
java.lang.String input) |
protected boolean |
BooleanPrompt.isInputValid(ConversationContext context,
java.lang.String input) |
protected abstract boolean |
ValidatingPrompt.isInputValid(ConversationContext context,
java.lang.String input)
Override this method to check the validity of the player's input.
|
protected boolean |
NumericPrompt.isNumberValid(ConversationContext context,
java.lang.Number input)
Override this method to do further validation on the numeric player
input after the input has been determined to actually be a number.
|