Package org.bukkit.conversations
Class ConversationContext
- java.lang.Object
-
- org.bukkit.conversations.ConversationContext
-
-
Constructor Summary
Constructors Constructor Description ConversationContext(Plugin plugin, Conversable forWhom, Map<Object,Object> initialSessionData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Object,Object>
getAllSessionData()
Gets the entire sessionData map.Conversable
getForWhom()
Gets the subject of the conversation.Plugin
getPlugin()
Gets the plugin that owns this conversation.Object
getSessionData(Object key)
Gets session data shared between allPrompt
invocations.void
setSessionData(Object key, Object value)
Sets session data shared between allPrompt
invocations.
-
-
-
Constructor Detail
-
ConversationContext
public ConversationContext(Plugin plugin, Conversable forWhom, Map<Object,Object> initialSessionData)
- Parameters:
plugin
- The owning plugin.forWhom
- The subject of the conversation.initialSessionData
- Any initial values to put in the sessionData map.
-
-
Method Detail
-
getPlugin
public Plugin getPlugin()
Gets the plugin that owns this conversation.- Returns:
- The owning plugin.
-
getForWhom
public Conversable getForWhom()
Gets the subject of the conversation.- Returns:
- The subject of the conversation.
-
getAllSessionData
public Map<Object,Object> getAllSessionData()
Gets the entire sessionData map.- Returns:
- The full sessionData map.
-
getSessionData
public Object getSessionData(Object key)
Gets session data shared between allPrompt
invocations. Use this as a way to pass data through each Prompt as the conversation develops.- Parameters:
key
- The session data key.- Returns:
- The requested session data.
-
-