Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow numbers in the changer for ExprHotbarSlot #6139

Merged
merged 4 commits into from
Oct 22, 2023

Conversation

TheLimeGlass
Copy link
Collaborator

@TheLimeGlass TheLimeGlass commented Oct 21, 2023

Description

The ExprHotbarSlot currently requires a slot to be able to change the index of the slot.
This means that you have to type set the currently selected hotbar slot of player to the slot 8 of player

This pull request allows for that still, but also removes the redundancy of typing out the entire slot
set hotbar slot of player to 8

The Player#setHeldItemSlot method only takes in an integer, so it makes to sense to support a direct input of an integer.

Also fixes a bug where there was no integer check for the input value being under 0 which could lead to an IllegalArgumentException being thrown.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@TheLimeGlass TheLimeGlass added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Oct 21, 2023
@Moderocky Moderocky merged commit d1fd453 into dev/feature Oct 22, 2023
5 checks passed
@Moderocky Moderocky deleted the enhancement/integer-current-slot branch October 22, 2023 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants