From 6346ff56bc48f8af418345b2ea8821fbcb426ae4 Mon Sep 17 00:00:00 2001 From: Govindas Date: Mon, 21 Jun 2021 10:10:26 +0000 Subject: [PATCH] Add arg 2 validation in reset options --- fastworldreset.sk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fastworldreset.sk b/fastworldreset.sk index b14b7e7..d944dc4 100644 --- a/fastworldreset.sk +++ b/fastworldreset.sk @@ -563,6 +563,9 @@ command /fastworldreset [] [] []: set {fastworldreset::exitpoint} to location of player send "&a&lFastWorldReset&2&l> &aYou have successfully set exit point at &e&l%{fastworldreset::exitpoint}%" else if arg 1 is "disable-chunk-reset": + if arg 2 is not set: + send "&a&lFastWorldReset&2&l> &cUsage: &e/fwr disable-chunk-reset " + stop if (arg 2 parsed as a world) is not a world: send "&a&lFastWorldReset&2&l> &cThe specified world &e%arg 2% &cis not loaded." stop @@ -573,6 +576,9 @@ command /fastworldreset [] [] []: else: send "&a&lFastWorldReset&2&l> &cChunk-based reset is already disabled in world &e%arg 2%&c!" else if arg 1 is "enable-chunk-reset": + if arg 2 is not set: + send "&a&lFastWorldReset&2&l> &cUsage: &e/fwr disable-chunk-reset " + stop if (arg 2 parsed as a world) is not a world: send "&a&lFastWorldReset&2&l> &cThe specified world &e%arg 2% &cis not loaded." stop