mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
Added getAllSessionData() to the Conversation API.
By: Alex Bennett <alex.eugene.bennett@gmail.com>
This commit is contained in:
parent
a487f8ec2b
commit
e58ce0019f
@ -11,9 +11,9 @@ import java.util.Map;
|
|||||||
* invocations.
|
* invocations.
|
||||||
*/
|
*/
|
||||||
public class ConversationContext {
|
public class ConversationContext {
|
||||||
private Conversable forWhom;
|
private final Conversable forWhom;
|
||||||
private Map<Object, Object> sessionData;
|
private final Map<Object, Object> sessionData;
|
||||||
private Plugin plugin;
|
private final Plugin plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param plugin The owning plugin.
|
* @param plugin The owning plugin.
|
||||||
@ -45,6 +45,17 @@ public class ConversationContext {
|
|||||||
return forWhom;
|
return forWhom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the underlying sessionData map.
|
||||||
|
*
|
||||||
|
* May be directly modified to manipulate session data.
|
||||||
|
*
|
||||||
|
* @return The full sessionData map.
|
||||||
|
*/
|
||||||
|
public Map<Object, Object> getAllSessionData() {
|
||||||
|
return sessionData;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets session data shared between all {@link Prompt} invocations. Use
|
* Gets session data shared between all {@link Prompt} invocations. Use
|
||||||
* this as a way to pass data through each Prompt as the conversation
|
* this as a way to pass data through each Prompt as the conversation
|
||||||
|
Loading…
Reference in New Issue
Block a user