Delete file

This commit is contained in:
fullwall 2012-10-22 14:54:15 +08:00
parent 2afb371099
commit d4be20422f
1 changed files with 0 additions and 51 deletions

View File

@ -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;
}
}