Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@

int maxArgForAware = context.getFlagValue("maxArgForAware", Integer.MAX_VALUE);
long argLengthWithoutFlags = context.getArgs().stream()
.takeWhile(value -> !value.startsWith("--") && !value.isEmpty())
.takeWhile(value -> !value.startsWith("-") && !value.isEmpty()) // ignore the flags

Check warning on line 177 in src/main/java/org/mvplugins/multiverse/core/command/context/issueraware/IssuerAwareContextBuilder.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Don't use trailing comments. Raw Output: /github/workspace/./src/main/java/org/mvplugins/multiverse/core/command/context/issueraware/IssuerAwareContextBuilder.java:177:81: warning: Don't use trailing comments. (com.puppycrawl.tools.checkstyle.checks.TrailingCommentCheck)
.count();

if (resolve.equals("issuerAware") && argLengthWithoutFlags <= maxArgForAware) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void onGameruleSetCommand(
@Description("{@@mv-core.gamerule.set.value.description}")
GameRuleValue gameRuleValue,

@Flags("resolve=issuerAware")
@Flags("resolve=issuerAware,maxArgForAware=2")
@Syntax("[World or *]")
@Description("{@@mv-core.gamerule.set.world.description}")
LoadedMultiverseWorld[] worlds) {
Expand Down Expand Up @@ -114,7 +114,7 @@ void onGameruleResetCommand(
@Description("{@@mv-core.gamerule.reset.gamerule.description}")
GameRule gamerule,

@Flags("resolve=issuerAware")
@Flags("resolve=issuerAware,maxArgForAware=1")
@Syntax("[World or *]")
@Description("{@@mv-core.gamerule.reset.world.description}")
LoadedMultiverseWorld[] worlds) {
Expand Down Expand Up @@ -152,7 +152,7 @@ void onGameruleResetCommand(
void onGameruleListCommand(
MVCommandIssuer issuer,

@Flags("resolve=issuerAware")
@Flags("resolve=issuerAware,maxArgForAware=0")
@Syntax("<world>")
@Description("{@@mv-core.gamerule.list.description.world}")
LoadedMultiverseWorld world,
Expand Down
Loading