Skip to content

Commit

Permalink
fix title command subtitle parsing, and title/actionbar targets input
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 26, 2020
1 parent 836cb01 commit e4f8687
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Expand Up @@ -77,8 +77,7 @@ public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException
}
scriptEntry.addObject("format", new ScriptTag(format));
}
if (arg.matchesPrefix("targets", "target")
&& arg.matchesArgumentList(PlayerTag.class)) {
if (arg.matchesPrefix("targets", "target")) {
scriptEntry.addObject("targets", ListTag.getListFor(TagManager.tagObject(arg.getValue(), scriptEntry.getContext()), scriptEntry.getContext()).filter(PlayerTag.class, scriptEntry));
}
else if (!scriptEntry.hasObject("per_player")
Expand Down
Expand Up @@ -82,8 +82,7 @@ else if (arg.matchesPrefix("fade_out")
String argStr = TagManager.tag(arg.getValue(), scriptEntry.getContext());
scriptEntry.addObject("fade_out", DurationTag.valueOf(argStr, scriptEntry.context));
}
else if (arg.matchesPrefix("targets", "target")
&& arg.matchesArgumentList(PlayerTag.class)) {
else if (arg.matchesPrefix("targets", "target")) {
scriptEntry.addObject("targets", ListTag.getListFor(TagManager.tagObject(arg.getValue(), scriptEntry.getContext()), scriptEntry.getContext()).filter(PlayerTag.class, scriptEntry));
}
else if (!scriptEntry.hasObject("per_player")
Expand Down Expand Up @@ -122,6 +121,7 @@ public void execute(ScriptEntry scriptEntry) {
BukkitTagContext context = (BukkitTagContext) scriptEntry.getContext();
if (!perPlayer) {
title = TagManager.tag(title, context);
subtitle = TagManager.tag(subtitle, context);
}

if (scriptEntry.dbCallShouldDebug()) {
Expand Down

0 comments on commit e4f8687

Please sign in to comment.