Skip to content

Commit

Permalink
fix mistake in new "reset:<duration>" args for time/weather
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 9, 2019
1 parent 568d767 commit 10fcdf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Expand Up @@ -81,6 +81,7 @@ public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException
}
else if (!scriptEntry.hasObject("value")
&& !scriptEntry.hasObject("reset")
&& !arg.matchesPrefix("reset")
&& arg.matchesArgumentType(DurationTag.class)) {
scriptEntry.addObject("value", arg.asType(DurationTag.class));
}
Expand All @@ -93,7 +94,7 @@ else if (!scriptEntry.hasObject("freeze")
&& arg.matches("freeze")) {
scriptEntry.addObject("freeze", new ElementTag(true));
}
else if (!scriptEntry.hasObject("value")
else if (!scriptEntry.hasObject("reset_after")
&& arg.matchesPrefix("reset")
&& arg.matchesArgumentType(DurationTag.class)) {
scriptEntry.addObject("reset_after", arg.asType(DurationTag.class));
Expand Down
Expand Up @@ -47,15 +47,15 @@ public class WeatherCommand extends AbstractCommand {
// <WorldTag.thunder_duration>
//
// @Usage
// Use to makes the weather sunny
// Use to make the weather sunny.
// - weather sunny
//
// @Usage
// Use to makes the weather storm in world "cookies"
// Use to start a storm in world "cookies".
// - weather storm cookies
//
// @Usage
// Use to make the weather storm for the attached player.
// Use to start a storm that's only visible to the attached player.
// - weather player storm
//
// @Usage
Expand Down Expand Up @@ -89,7 +89,7 @@ else if (!scriptEntry.hasObject("value")
&& arg.matchesEnum(Value.values())) {
scriptEntry.addObject("value", arg.asElement());
}
else if (!scriptEntry.hasObject("value")
else if (!scriptEntry.hasObject("reset_after")
&& arg.matchesPrefix("reset")
&& arg.matchesArgumentType(DurationTag.class)) {
scriptEntry.addObject("reset_after", arg.asType(DurationTag.class));
Expand Down

0 comments on commit 10fcdf6

Please sign in to comment.