Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.conversations.ConversationContext Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

org.bukkit.conversations.ConversationContext.ConversationContext ( Plugin  plugin,
Conversable  forWhom,
Map< Object, Object >  initialSessionData 
)
Parameters
pluginThe owning plugin.
forWhomThe subject of the conversation.
initialSessionDataAny initial values to put in the sessionData map.

Definition at line 22 of file ConversationContext.java.

Member Function Documentation

Plugin org.bukkit.conversations.ConversationContext.getPlugin ( )

Gets the plugin that owns this conversation.

Returns
The owning plugin.

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.

Parameters
keyThe session data key.
Returns
The requested session data.

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.

Parameters
keyThe session data key.
valueThe session data value.

Definition at line 60 of file ConversationContext.java.


The documentation for this class was generated from the following file: