Skip to content

Commit

Permalink
fix waitable nonexistent commands showing wrong error message
Browse files Browse the repository at this point in the history
also fix recursive meta link oops
  • Loading branch information
mcmonkey4eva committed Jan 26, 2021
1 parent b7f1998 commit 25c46bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -1888,7 +1888,7 @@ else if (res > 0) {
// @description
// returns a copy of the list with all its contents parsed through the given tag and only including ones that returned 'true'.
// For example: a list of '1|2|3|4|5' .filter[is[or_more].than[3]] returns a list of '3|4|5'.
// One should generally prefer <@link tag ListTag.filter>.
// One should generally prefer <@link tag ListTag.filter_tag>.
// -->
registerTag("filter", (attribute, object) -> {
String tag = attribute.getRawContext(1);
Expand Down Expand Up @@ -1919,7 +1919,7 @@ else if (res > 0) {
// @description
// returns a copy of the list with all its contents parsed through the given tag.
// For example: a list of 'one|two' .parse[to_uppercase] returns a list of 'ONE|TWO'.
// One should generally prefer <@link tag ListTag.parse>.
// One should generally prefer <@link tag ListTag.parse_tag>.
// -->
registerTag("parse", (attribute, object) -> {
ListTag newlist = new ListTag();
Expand Down
Expand Up @@ -202,10 +202,11 @@ public ScriptEntry(String command, String[] arguments, ScriptContainer script, L
}
else if (command.charAt(0) == '~') {
internal.command = command.substring(1);
if (DenizenCore.getCommandRegistry().get(internal.command) instanceof Holdable) {
internal.actualCommand = DenizenCore.getCommandRegistry().get(internal.command);
if (internal.actualCommand instanceof Holdable) {
internal.waitfor = true;
}
else {
else if (internal.actualCommand != null) {
Debug.echoError("The command '" + internal.command + "' cannot be waited for!");
}
}
Expand Down

0 comments on commit 25c46bc

Please sign in to comment.