![]() |
Bukkit
1.4.7-R1.0
|
A ConversationContext provides continuity between nodes in the prompt graph by giving the developer access to the subject of the conversation and a generic map for storing values that are shared between all Prompt invocations. More...
Public Member Functions | |
| ConversationContext (Plugin plugin, Conversable forWhom, Map< Object, Object > initialSessionData) | |
| Plugin | getPlugin () |
| Gets the plugin that owns this conversation. | |
| Conversable | getForWhom () |
| Gets the subject of the conversation. | |
| Object | getSessionData (Object key) |
| Gets session data shared between all Prompt invocations. | |
| void | setSessionData (Object key, Object value) |
| Sets session data shared between all Prompt invocations. | |
A ConversationContext provides continuity between nodes in the prompt graph by giving the developer access to the subject of the conversation and a generic map for storing values that are shared between all Prompt invocations.
Definition at line 12 of file ConversationContext.java.
| org.bukkit.conversations.ConversationContext.ConversationContext | ( | Plugin | plugin, |
| Conversable | forWhom, | ||
| Map< Object, Object > | initialSessionData | ||
| ) |
| plugin | The owning plugin. |
| forWhom | The subject of the conversation. |
| initialSessionData | Any initial values to put in the sessionData map. |
Definition at line 22 of file ConversationContext.java.
| Conversable org.bukkit.conversations.ConversationContext.getForWhom | ( | ) |
Gets the subject of the conversation.
Definition at line 40 of file ConversationContext.java.
Referenced by org.bukkit.conversations.Conversation.abandon(), org.bukkit.conversations.ValidatingPrompt.acceptInput(), org.bukkit.conversations.Conversation.acceptInput(), org.bukkit.conversations.Conversation.begin(), org.bukkit.conversations.Conversation.getForWhom(), and org.bukkit.conversations.Conversation.outputNextPrompt().
| Plugin org.bukkit.conversations.ConversationContext.getPlugin | ( | ) |
Gets the plugin that owns this conversation.
Definition at line 32 of file ConversationContext.java.
| Object org.bukkit.conversations.ConversationContext.getSessionData | ( | Object | key | ) |
Gets session data shared between all Prompt invocations.
Use this as a way to pass data through each Prompt as the conversation develops.
| key | The session data key. |
Definition at line 50 of file ConversationContext.java.
| void org.bukkit.conversations.ConversationContext.setSessionData | ( | Object | key, |
| Object | value | ||
| ) |
Sets session data shared between all Prompt invocations.
Use this as a way to pass data through each prompt as the conversation develops.
| key | The session data key. |
| value | The session data value. |
Definition at line 60 of file ConversationContext.java.