Skip to content

Commit 5dd21d0

Browse files
committed
follow dmk feedback.
1 parent dbb8000 commit 5dd21d0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

eternalcore-core/src/main/java/com/eternalcode/core/feature/itemedit/ItemLoreArgument.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717
@LiteArgument(type = int.class, name = ItemLoreArgument.KEY)
1818
class ItemLoreArgument extends AbstractViewerArgument<Integer> {
1919

20-
private static final List<Integer> suggestions = List.of(1, 2, 3, 4, 5, 6); // Sugeruj numery od 1 do 6
2120
static final String KEY = "item-lore";
2221

22+
// Suggests numbers from 1 to 6, because in the command we add +1
23+
// so that users who are not aware that programming counts from zero understand it.
24+
private static final List<Integer> suggestions = List.of(1, 2, 3, 4, 5, 6);
25+
2326
@Inject
2427
public ItemLoreArgument(TranslationManager translationManager) {
2528
super(translationManager);
@@ -42,9 +45,12 @@ public ParseResult<Integer> parse(Invocation<CommandSender> invocation, String a
4245
}
4346

4447
@Override
45-
public SuggestionResult suggest(Invocation<CommandSender> invocation, Argument<Integer> argument, SuggestionContext context) {
48+
public SuggestionResult suggest(
49+
Invocation<CommandSender> invocation,
50+
Argument<Integer> argument,
51+
SuggestionContext context) {
4652
return suggestions.stream()
47-
.map(String::valueOf)
48-
.collect(SuggestionResult.collector());
53+
.map(String::valueOf)
54+
.collect(SuggestionResult.collector());
4955
}
5056
}

0 commit comments

Comments
 (0)