mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 07:05:51 +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
|
@Override
|
||||||
public Prompt acceptInput(ConversationContext context, String input) {
|
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) {
|
if (input.equalsIgnoreCase(Lang.get("cmdCancel")) == false && input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||||
String[] commands = input.split(Lang.get("charSemi"));
|
String[] commands = input.split(Lang.get("charSemi"));
|
||||||
LinkedList<String> cmdList = new LinkedList<String>();
|
LinkedList<String> cmdList = new LinkedList<String>();
|
||||||
|
Loading…
Reference in New Issue
Block a user