Skip to content

Conversation

@CitralFlo
Copy link
Member

Fixes some suggestion from LiteCommands in StackAmountArgument found during tests of GH-1214. Additionally better messages for error validation.

@CitralFlo CitralFlo requested a review from a team as a code owner October 19, 2025 21:45
@CitralFlo
Copy link
Member Author

new.messages.mp4

@CitralFlo CitralFlo changed the title Add error message for incorrect stack number and update validation logic GH-1218 Add error message for incorrect stack number and update validation logic Oct 19, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves the validation logic and error messages for the stack amount argument in commands. The changes are solid, particularly the improved validation to reject non-positive stack amounts and the more specific error message for invalid number formats. I've identified a couple of minor issues: an outdated command usage description and inconsistent visibility for newly added configuration fields. Addressing these will improve documentation accuracy and code consistency.

public Notice onlyPlayer = Notice.chat("<red>✘ <dark_red>Command is only for players!");
public Notice numberBiggerThanZero = Notice.chat("<red>✘ <dark_red>The number must be greater than 0!");
public Notice numberBiggerThanOrEqualZero = Notice.chat("<red>✘ <dark_red>The number must be greater than or equal to 0!");
Notice stackNumberIncorrect = Notice.chat("<red>✘ <dark_red><bold>Incorrect number!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why <bold>?

public Notice onlyPlayer = Notice.chat("<red>✘ <dark_red>Ta komenda jest dostępna tylko dla graczy!");
public Notice numberBiggerThanZero = Notice.chat("<red>✘ <dark_red>Liczba musi być większa od 0!");
public Notice numberBiggerThanOrEqualZero = Notice.chat("<red>✘ <dark_red>Liczba musi być równa lub większa od 0!");
Notice stackNumberIncorrect = Notice.chat("<red>✘ <dark_red><bold>Niepoprawna liczba!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why <bold>?

# Conflicts:
#	eternalcore-core/src/main/java/com/eternalcode/core/litecommand/argument/messages/ENArgumentMessages.java
#	eternalcore-core/src/main/java/com/eternalcode/core/litecommand/argument/messages/PLArgumentMessages.java
@vLuckyyy vLuckyyy merged commit 3f3f440 into master Oct 20, 2025
2 checks passed
@vLuckyyy vLuckyyy deleted the StackAmountArgument-and-item-litecommand-warn branch October 20, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants