use of io.github.wysohn.triggerreactor.bukkit.tools.prompts.UsagePrompt in project TriggerReactor by wysohn.
the class ScriptEditManager method startEdit.
@Override
public void startEdit(ICommandSender sender, String title, String script, SaveHandler saveHandler) {
ConversationFactory factory = new ConversationFactory(plugin.getMain());
EditingPrompt prompt = new EditingPrompt(plugin.getMain(), sender.get(), new ScriptEditor(title, script, saveHandler));
Conversation conv = factory.thatExcludesNonPlayersWithMessage("Sorry, this is in-game only feature!").withFirstPrompt(new UsagePrompt(prompt)).addConversationAbandonedListener(this).buildConversation(sender.get());
conv.getContext().setSessionData("edit", prompt);
conv.begin();
}
Aggregations