diff --git a/src/main/java/net/citizensnpcs/trait/text/StartPrompt.java b/src/main/java/net/citizensnpcs/trait/text/StartPrompt.java deleted file mode 100644 index 89967f9d0..000000000 --- a/src/main/java/net/citizensnpcs/trait/text/StartPrompt.java +++ /dev/null @@ -1,51 +0,0 @@ -package net.citizensnpcs.trait.text; - -import net.citizensnpcs.util.Messages; -import net.citizensnpcs.util.Messaging; - -import org.bukkit.command.CommandSender; -import org.bukkit.conversations.ConversationContext; -import org.bukkit.conversations.Prompt; -import org.bukkit.conversations.StringPrompt; - -public class StartPrompt extends StringPrompt { - private final Text text; - - public StartPrompt(Text text) { - this.text = text; - } - - @Override - public Prompt acceptInput(ConversationContext context, String input) { - CommandSender sender = (CommandSender) context.getForWhom(); - if (input.equalsIgnoreCase("add")) - return new TextAddPrompt(text); - else if (input.equalsIgnoreCase("edit")) - return new TextEditStartPrompt(text); - else if (input.equalsIgnoreCase("remove")) - return new TextRemovePrompt(text); - else if (input.equalsIgnoreCase("random")) - Messaging.sendTr(sender, Messages.TEXT_EDITOR_RANDOM_TALKER_SET, text.toggleRandomTalker()); - else if (input.equalsIgnoreCase("realistic looking")) - Messaging.sendTr(sender, Messages.TEXT_EDITOR_REALISTIC_LOOKING_SET, - text.toggleRealisticLooking()); - else if (input.equalsIgnoreCase("close")) - Messaging.sendTr(sender, Messages.TEXT_EDITOR_CLOSE_TALKER_SET, text.toggle()); - else if (input.equalsIgnoreCase("help")) { - context.setSessionData("said-text", false); - Messaging.send(sender, getPromptText(context)); - } else - Messaging.sendErrorTr(sender, Messages.TEXT_EDITOR_INVALID_EDIT_TYPE); - - return new StartPrompt(text); - } - - @Override - public String getPromptText(ConversationContext context) { - if (context.getSessionData("said-text") == Boolean.TRUE) - return ""; - String text = Messaging.tr(Messages.TEXT_EDITOR_START_PROMPT); - context.setSessionData("said-text", Boolean.TRUE); - return text; - } -} \ No newline at end of file