From e58ce0019f2b9fb7a49a92b17edc9f4a9939fecc Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 26 Dec 2018 08:00:00 +1100 Subject: [PATCH] Added getAllSessionData() to the Conversation API. By: Alex Bennett --- .../conversations/ConversationContext.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/conversations/ConversationContext.java b/paper-api/src/main/java/org/bukkit/conversations/ConversationContext.java index 4f33ff465a..e0781c285b 100644 --- a/paper-api/src/main/java/org/bukkit/conversations/ConversationContext.java +++ b/paper-api/src/main/java/org/bukkit/conversations/ConversationContext.java @@ -11,9 +11,9 @@ import java.util.Map; * invocations. */ public class ConversationContext { - private Conversable forWhom; - private Map sessionData; - private Plugin plugin; + private final Conversable forWhom; + private final Map sessionData; + private final Plugin plugin; /** * @param plugin The owning plugin. @@ -45,6 +45,17 @@ public class ConversationContext { return forWhom; } + /** + * Gets the underlying sessionData map. + * + * May be directly modified to manipulate session data. + * + * @return The full sessionData map. + */ + public Map getAllSessionData() { + return sessionData; + } + /** * Gets session data shared between all {@link Prompt} invocations. Use * this as a way to pass data through each Prompt as the conversation