mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-22 23:31:31 +01:00
Add error message if item in hand pattern not specified
This commit is contained in:
parent
869e787fea
commit
02e68de7c7
@ -58,12 +58,15 @@ public class TextStartPrompt extends StringPrompt {
|
||||
if (parts.length > 1) {
|
||||
text.setItemInHandPattern(parts[1]);
|
||||
Messaging.sendTr(sender, Messages.TEXT_EDITOR_SET_ITEM, parts[1]);
|
||||
} else {
|
||||
Messaging.sendErrorTr(sender, Messages.TEXT_EDITOR_MISSING_ITEM_PATTERN);
|
||||
}
|
||||
} else if (input.equalsIgnoreCase("help")) {
|
||||
context.setSessionData("said-text", false);
|
||||
Messaging.send(sender, getPromptText(context));
|
||||
} else
|
||||
} else {
|
||||
Messaging.sendErrorTr(sender, Messages.TEXT_EDITOR_INVALID_EDIT_TYPE);
|
||||
}
|
||||
|
||||
return new TextStartPrompt(text);
|
||||
}
|
||||
|
@ -321,6 +321,7 @@ public class Messages {
|
||||
public static final String TEXT_EDITOR_INVALID_INPUT = "citizens.editors.text.invalid-input";
|
||||
public static final String TEXT_EDITOR_INVALID_PAGE = "citizens.editors.text.invalid-page";
|
||||
public static final String TEXT_EDITOR_INVALID_RANGE = "citizens.editors.text.invalid-range";
|
||||
public static final String TEXT_EDITOR_MISSING_ITEM_PATTERN = "citizens.editors.text.missing-item-set-pattern";
|
||||
public static final String TEXT_EDITOR_PAGE_PROMPT = "citizens.editors.text.change-page-prompt";
|
||||
public static final String TEXT_EDITOR_RANDOM_TALKER_SET = "citizens.editors.text.random-talker-set";
|
||||
public static final String TEXT_EDITOR_RANGE_SET = "citizens.editors.text.range-set";
|
||||
|
@ -283,6 +283,7 @@ citizens.editors.text.edit-begin-prompt=Enter the index of the entry you wish to
|
||||
citizens.editors.text.edit-prompt=Enter text to edit the entry.
|
||||
citizens.editors.text.edited-text=Changed entry at index [[{0}]] to [[{1}]].
|
||||
citizens.editors.text.end=Exited the text editor.
|
||||
citizens.editors.text.missing-item-set-pattern=Missing item in hand pattern.
|
||||
citizens.editors.text.invalid-edit-type=Invalid edit type.
|
||||
citizens.editors.text.invalid-index=[[{0}]] is not a valid index!
|
||||
citizens.editors.text.invalid-input=Invalid input.
|
||||
|
Loading…
Reference in New Issue
Block a user