Skip to content

Commit 46f6724

Browse files
authored
Merge pull request #3384 from Multiverse/fix/issuer-aware
Fix ambiguous error message with issue aware args is not found by using maxArgForAware
2 parents 6dcb40f + b8bdec2 commit 46f6724

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

src/main/java/org/mvplugins/multiverse/core/commands/EntitySpawnConfigCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ final class EntitySpawnConfigCommand extends CoreCommand {
5252
void onInfoCommand(
5353
MVCommandIssuer issuer,
5454

55-
@Flags("resolve=issuerAware")
55+
@Flags("resolve=issuerAware,maxArgForAware=0")
5656
@Syntax("[world]")
5757
MultiverseWorld world,
5858

@@ -91,7 +91,7 @@ private List<String> getEntitySpawnConfigList(MultiverseWorld world) {
9191
void onModifyCommand(
9292
MVCommandIssuer issuer,
9393

94-
@Flags("resolve=issuerAware")
94+
@Flags("resolve=issuerAware,maxArgForAware=4")
9595
@Syntax("[world]")
9696
MultiverseWorld world,
9797

src/main/java/org/mvplugins/multiverse/core/commands/InfoCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class InfoCommand extends CoreCommand {
6161
public void onInfoCommand(
6262
MVCommandIssuer issuer,
6363

64-
@Flags("resolve=issuerAware")
65-
@Syntax("<world>")
64+
@Flags("resolve=issuerAware,maxArgForAware=0")
65+
@Syntax("[world]")
6666
@Description("{@@mv-core.info.description.world}")
6767
LoadedMultiverseWorld world,
6868

src/main/java/org/mvplugins/multiverse/core/commands/ModifyCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ class ModifyCommand extends CoreCommand {
4949
"@propsmodifyaction:notByIssuerForArg=arg1|@mvworldpropsname:byIssuerForArg=arg1 " +
5050
"@mvworldpropsname:notByIssuerForArg=arg1|@mvworldpropsvalue:byIssuerForArg=arg1 " +
5151
"@mvworldpropsvalue:notByIssuerForArg=arg1")
52-
@Syntax("[world] <set|add|remove|reset> <property> <value>")
52+
@Syntax("[world] <set|add|remove|reset> <property> [value]")
5353
@Description("{@@mv-core.modify.description}")
5454
void onModifyCommand(// SUPPRESS CHECKSTYLE: ParameterNumber
5555
MVCommandIssuer issuer,
5656

57-
@Flags("resolve=issuerAware")
57+
@Flags("resolve=issuerAware,maxArgForAware=3")
5858
@Syntax("[world]")
5959
@Description("{@@mv-core.modify.world.description}")
6060
@NotNull MultiverseWorldValue worldValue,

src/main/java/org/mvplugins/multiverse/core/commands/PurgeAllEntitiesCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class PurgeAllEntitiesCommand extends CoreCommand {
3333
void onPurgeAllEntitiesCommand(
3434
MVCommandIssuer issuer,
3535

36-
@Flags("resolve=issuerAware")
36+
@Flags("resolve=issuerAware,maxArgForAware=1")
3737
@Syntax("[world]")
3838
LoadedMultiverseWorld world,
3939

src/main/java/org/mvplugins/multiverse/core/commands/PurgeEntitiesCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class PurgeEntitiesCommand extends CoreCommand {
2828
void onPurgeEntityCommand(
2929
MVCommandIssuer issuer,
3030

31-
@Flags("resolve=issuerAware")
31+
@Flags("resolve=issuerAware,maxArgForAware=0")
3232
@Syntax("[world]")
3333
LoadedMultiverseWorld world
3434
) {

src/main/java/org/mvplugins/multiverse/core/commands/WhoCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ void onWhoAllCommand(
7474
@Subcommand("who")
7575
@CommandPermission("multiverse.core.list.who")
7676
@CommandCompletion("@mvworlds:scope=both @flags:groupName=" + PageFilterFlags.NAME)
77-
@Syntax("<world> [--page <page>] [--filter <filter>]")
77+
@Syntax("[world] [--page <page>] [--filter <filter>]")
7878
@Description("{@@mv-core.who.description}")
7979
void onWhoCommand(
8080
MVCommandIssuer issuer,
81-
@Flags("resolve=issuerAware")
82-
@Syntax("<world>")
81+
@Flags("resolve=issuerAware,maxArgForAware=")
82+
@Syntax("[world]")
8383
@Description("{@@mv-core.who.world.description}")
8484
LoadedMultiverseWorld inputtedWorld,
8585

src/main/java/org/mvplugins/multiverse/core/commands/WorldBorderCommand.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void onWorldBorderAdd(
3535
@Syntax("[time]")
3636
int time,
3737

38-
@Flags("resolve=issuerAware")
38+
@Flags("resolve=issuerAware,maxArgForAware=0")
3939
@Syntax("[world]")
4040
LoadedMultiverseWorld world
4141
) {
@@ -54,7 +54,7 @@ void onWorldBorderCenter(
5454
@Syntax("[z]")
5555
double z,
5656

57-
@Flags("resolve=issuerAware")
57+
@Flags("resolve=issuerAware,maxArgForAware=0")
5858
@Syntax("[world]")
5959
LoadedMultiverseWorld world
6060
) {
@@ -79,7 +79,7 @@ void onWorldBorderDamageAmount(
7979
@Syntax("<damage>")
8080
double damage,
8181

82-
@Flags("resolve=issuerAware")
82+
@Flags("resolve=issuerAware,maxArgForAware=0")
8383
@Syntax("[world]")
8484
LoadedMultiverseWorld world
8585
) {
@@ -103,7 +103,7 @@ void onWorldBorderDamageBuffer(
103103
@Syntax("<distance>")
104104
double distance,
105105

106-
@Flags("resolve=issuerAware")
106+
@Flags("resolve=issuerAware,maxArgForAware=0")
107107
@Syntax("[world]")
108108
LoadedMultiverseWorld world
109109
) {
@@ -124,7 +124,7 @@ void onWorldBorderDamageBuffer(
124124
void onWorldBorderGet(
125125
MVCommandIssuer issuer,
126126

127-
@Flags("resolve=issuerAware")
127+
@Flags("resolve=issuerAware,maxArgForAware=0")
128128
@Syntax("[world]")
129129
LoadedMultiverseWorld world
130130
) {
@@ -147,7 +147,7 @@ void onWorldBorderSet(
147147
@Syntax("[time]")
148148
int time,
149149

150-
@Flags("resolve=issuerAware")
150+
@Flags("resolve=issuerAware,maxArgForAware=0")
151151
@Syntax("[world]")
152152
LoadedMultiverseWorld world
153153
) {
@@ -179,7 +179,7 @@ void onWorldBorderWarningDistance(
179179
@Syntax("<distance>")
180180
int distance,
181181

182-
@Flags("resolve=issuerAware")
182+
@Flags("resolve=issuerAware,maxArgForAware=0")
183183
@Syntax("[world]")
184184
LoadedMultiverseWorld world
185185
) {
@@ -203,7 +203,7 @@ void onWorldBorderWarningTime(
203203
@Syntax("<time>")
204204
int time,
205205

206-
@Flags("resolve=issuerAware")
206+
@Flags("resolve=issuerAware,maxArgForAware=0")
207207
@Syntax("[world]")
208208
LoadedMultiverseWorld world
209209
) {

0 commit comments

Comments
 (0)