mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-13 22:25:50 +01:00
Disallow use of colons in command events, prevents #274
This commit is contained in:
parent
e014697010
commit
ca117da950
@ -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>();
|
||||
|
Loading…
Reference in New Issue
Block a user