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

Add time states for PlayerItemHeldEvent and hotbar slot #5271

Merged
merged 12 commits into from
Jun 27, 2023

Conversation

TheLimeGlass
Copy link
Collaborator

Description

  • Adds time states for PlayerItemHeldEvent event.
  • Adds time states for ExprHotbarSlot with PlayerItemHeldEvent event.
  • Made the players in ExprHotbarSlot not required (default expression).
  • Cleaned up ExprHotbarSlot class.

Test script:

on item held change:
	if the selected hotbar slot was a diamond:
		set the currently selected hotbar slot to slot 5 of player

	message "previous &c%past event-slot%"
	message "current &a%event-slot%"
	message "&6future %future event-slot%"

	# Works the same as above.
	message "previous &c%past selected hotbar slot of player%"
	message "current &a%currently selected hotbar slot of player%"
	message "&6future %future selected hotbar slot of player%"

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

@TheLimeGlass TheLimeGlass added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Dec 24, 2022
Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
@TheLimeGlass TheLimeGlass merged commit bb87694 into master Jun 27, 2023
5 checks passed
@TheLimeGlass TheLimeGlass deleted the enhancement/item-held-event-time-values branch July 16, 2023 23:02
Moderocky pushed a commit to Moderocky/Skript that referenced this pull request Sep 16, 2023
NotSoDelayed pushed a commit to NotSoDelayed/Skript that referenced this pull request Oct 30, 2023
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.

None yet

4 participants