File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/main/java/org/mvplugins/multiverse/core
command/context/issueraware Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ private <I extends IssuerAwareValue> I resolveValue(BukkitCommandExecutionContex
174174
175175 int maxArgForAware = context .getFlagValue ("maxArgForAware" , Integer .MAX_VALUE );
176176 long argLengthWithoutFlags = context .getArgs ().stream ()
177- .takeWhile (value -> !value .startsWith ("-- " ) && !value .isEmpty ())
177+ .takeWhile (value -> !value .startsWith ("-" ) && !value .isEmpty ()) // ignore the flags
178178 .count ();
179179
180180 if (resolve .equals ("issuerAware" ) && argLengthWithoutFlags <= maxArgForAware ) {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ void onGameruleSetCommand(
6767 @ Description ("{@@mv-core.gamerule.set.value.description}" )
6868 GameRuleValue gameRuleValue ,
6969
70- @ Flags ("resolve=issuerAware" )
70+ @ Flags ("resolve=issuerAware,maxArgForAware=2 " )
7171 @ Syntax ("[World or *]" )
7272 @ Description ("{@@mv-core.gamerule.set.world.description}" )
7373 LoadedMultiverseWorld [] worlds ) {
@@ -114,7 +114,7 @@ void onGameruleResetCommand(
114114 @ Description ("{@@mv-core.gamerule.reset.gamerule.description}" )
115115 GameRule gamerule ,
116116
117- @ Flags ("resolve=issuerAware" )
117+ @ Flags ("resolve=issuerAware,maxArgForAware=1 " )
118118 @ Syntax ("[World or *]" )
119119 @ Description ("{@@mv-core.gamerule.reset.world.description}" )
120120 LoadedMultiverseWorld [] worlds ) {
@@ -152,7 +152,7 @@ void onGameruleResetCommand(
152152 void onGameruleListCommand (
153153 MVCommandIssuer issuer ,
154154
155- @ Flags ("resolve=issuerAware" )
155+ @ Flags ("resolve=issuerAware,maxArgForAware=0 " )
156156 @ Syntax ("<world>" )
157157 @ Description ("{@@mv-core.gamerule.list.description.world}" )
158158 LoadedMultiverseWorld world ,
You can’t perform that action at this time.
0 commit comments