/** * Creates an welcome-editor for the given player to change the welcome-message of the given Warp. * * @param forWhom the LocalPlayer * @param warp the Warp */ public void create(BukkitPlayer forWhom, Warp warp) { Map<Object, Object> initialSessionData = new HashMap<Object, Object>(); initialSessionData.put(Locale.class, forWhom.getLocale()); initialSessionData.put(Warp.class, warp); factory .withInitialSessionData(initialSessionData) .buildConversation(forWhom.getWrapped()) .begin(); }
/** * Creates an instance. * * @param factory the ConversationFactory to build conversations with */ public WelcomeEditorFactory(ConversationFactory factory) { this.factory = factory.withEscapeSequence(ESCAPE_SEQUENCE).withFirstPrompt(new MessageInputPrompt()); }