Disallow use of colons in command events, prevents #274

This commit is contained in:
HappyPikachu 2018-02-10 12:56:01 -05:00
parent e014697010
commit ca117da950

View File

@ -2191,6 +2191,10 @@ public class EventFactory implements ConversationAbandonedListener {
@Override
public Prompt acceptInput(ConversationContext context, String input) {
if (input.contains(":")) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("eventEditorInvalidEntry") + " \':\'");
return new CommandsPrompt();
}
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
String[] commands = input.split(Lang.get("charSemi"));
LinkedList<String> cmdList = new LinkedList<String>();