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

"Selected hotbar slot" is not functioning as intended. #4508

Closed
1 task done
WilliamPlays0402 opened this issue Jan 16, 2022 · 4 comments
Closed
1 task done

"Selected hotbar slot" is not functioning as intended. #4508

WilliamPlays0402 opened this issue Jan 16, 2022 · 4 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. documentation Related to Skript's official documentation. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@WilliamPlays0402
Copy link

WilliamPlays0402 commented Jan 16, 2022

Skript/Server Version

Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
Skript's documentation can be found here: https://skriptlang.github.io/Skript
Server Version: git-Paper-408 (MC: 1.17.1)
Skript Version: 2.6
Installed Skript Addons:
- skDragon v0.17
- skRayFall v1.9.26 (https://sk.rayfall.net/)
- SkBee v1.13.1 (https://github.com/ShaneBeee/SkBee)

Bug Description

The expression "Hotbar slot" returns the current item in the player's hand instead of the number of the player's selected slot.
https://skriptlang.github.io/Skript/expressions.html#ExprHotbarSlot

Expected Behavior

Expected behaviour:
send "%player's selected hotbar slot%" to player #Sends the index of player's held item in the hotbar

Actual behaviour:
Sends the player's held item

Steps to Reproduce

command /test:
  trigger:
    send "%player's selected hotbar slot%" ## sends the player's held item

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and confirm I am following them with this report.
@AyhamAl-Ali
Copy link
Member

AyhamAl-Ali commented Jan 16, 2022

AFAIK, this is how it should work, there is another expression to get its index which is Slot Index - index of player's selected hotbar slot

@WilliamPlays0402
Copy link
Author

Thank you! Someone may have to edit the documentation and skripthub.net!

@TPGamesNL
Copy link
Member

Just gonna keep this issue open because the description needs modification, because it says that it's anumber while it's a slot

@TPGamesNL TPGamesNL reopened this Jan 16, 2022
@TPGamesNL TPGamesNL added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels Jan 16, 2022
@AyhamAl-Ali
Copy link
Member

AyhamAl-Ali commented Jan 19, 2022

@TPGamesNL assign it to me please

@TPGamesNL TPGamesNL added the documentation Related to Skript's official documentation. label Jan 19, 2022
AyhamAl-Ali added a commit to AyhamAl-Ali/Skript that referenced this issue Jan 30, 2022
- Made examples collapsible
- Added EffectSection support
- Added a template for a yet-to-come docs feature (By Addon) cell which tells which addon created this element (this is still under progress so I left it commented to finish later)
- Solved SkriptLang#4508
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Feb 2, 2022
Moderocky added a commit that referenced this issue Jan 20, 2023
* Make `parsed` optional in `parsed as`

* First Improvements Phase

+ Added DarkMode (Switcher, AutoLoad from cookies)
+ Added support for lower versions in search filter (v:2.5-)
+ Added Search results counter
+ Added support for branched version search (v:2.2-dev36)

* Removed the SH for now until I implement the new one.

* Improved the overall style to be much easier to read and understand.
* Shorten the tabs list by using sub-tabs
+ Version number will now go to the GitHub changelog link of that version when clicked

* Fixes

- Fixed found results colors
- Fixed found results showing in some cases when should not

* 🛠 Sections + Improvements

+ Added sections page
- Improved page inital loading for chromioum based browsers (up to 70%) by using content-visibility css property
- Fixed searching filters regex
- Improved submenu active state

* Forgot search fixes

* 🚀 Another Update

- Merged PR #4063
- Added more info about strings (single quotes support after v2.6)
- Fixed all broken docs links in examples and descriptions
- Improved the docs patterns to temove unnecessary parentheses such as [(script)] ex. ExprAllCommands
- Unified the word "coluor" to be "color" for better search results and unified usage

* Sections update & much more fixes

- Update sections description & examples
- Revert SecConditional syntax ordering changes
- Fixed more broken docs links using ../ instead of ./
- Fixed hooks docs not generating because the plugins are not installed, now they will generate if the user have /docs-template/ folder in Skript's folder OR the plugins installed
- Updated docs info of hooks (required-plugins section)
- Fixed classes and events requiredPlugins section joining values using newline instead of ", "
- Unified left-over "Colour" words in ExprColorOf

* 🛠 SyntaxHighlighting + Improvements

- Added custom Skript SyntaxHighlighting (Much faster, made for Skript, Built-in)
- Theme Improvements
- Fixed a padding bug causes recently in this PR
- Fixed a bug in theme switcher button in home page
- Added stable version and more placeholders to be used later on
- Anchor elements Improvements

* 🚀 'New' Tab and much more

This is probably the last update in this PR

- Added 'New' Tab that show all the registered syntaxes with a version filter to see the new additions since specific version
- Added new search filters (is:new type:cond type:expr etc.)
- Added syntax type on the right side
- Syntax left border will now depends on the type
- Added copy search link to allow people to paste links with custom search parameter
- Added 'new' badge beside new added/updated syntaxes
- Allow generating hooks docs if in testing mode and doc-templates folders exists (to make it easier for debugging and new releases)
- Some main.js improvements and cleaning up
- Search bar and search icon now have a tooltip to show some information
- Updated the light bulb icon to match the feel of the website
- Added 'How to generate the docs' section to README
- Dimmed the white text a bit in dark mode

* 🛠 Mobile CSS fixes

- Fixed new CSS not working well on mobile
- Improved CSS for mobile

* 🛠 Little CSS fixes

* 🛠 Item type text color

* 🛠 Quick improvements and fixes

- Improved new.html page versions loading (by caching versions)
- Fixed duplicated IDs check and new.html sidebar items filtering
- Fixed search link parameter decoding '+' as a space
- Fixed new search filters not showing results count
- White theme improvements

* Improvements

- Fix dark mode not selected by default
- Improve hash link scroll handling
- Fix new.html versions showing empty option sometimes
- Merged #4348 Thanks to (@oskarkk)
- Readded (font) chat component to text.html after removing it by accident
- Fixed unnamed classes warning in docs.json 
- Fixed typo in EvtBlock
- Added missing docs info for couple classes
- Improved light off icon
- Improved white theme background color

* Add Javadocs

* Revert "Add Javadocs"

This reverts commit 56d2cf6.

* Add javadocs navbar item

* A quick checkpoint

- Made examples collapsible
- Added EffectSection support
- Added a template for a yet-to-come docs feature (By Addon) cell which tells which addon created this element (this is still under progress so I left it commented to finish later)
- Solved #4508

* 🚀 Should be ready now

- Fixed few css and js bugs

* Fixes

- Fixed last element cutting off on mobile (when sidebar disaapears)
- Improved empty space below examples not equal to above example box

* Quick fix for example spaces

* Improvements

- Fix new.html page loading issues
- Improve overall js loading using 'defer'
- Added theme-color meta tag

* Improve new.html again & fix jQuery loading order

* Fix chrome scrolling issue that caused more issues

* Imrpovements

- Improved white theme once again (and hopefully last time)
- Improved scrollbar styling
- Improved link color on white theme
- Fixed search result counter shifted 1 pixel down
- Added a new header tab 'Dev Tools' for anything related to addon developement in general such as Javadocs and later on addon development tutorials maybe

* Fix black theme flicker when on white theme on load

* Fix white theme flickering (again)

* JS Improvements

* Improve auto hash scroll

* Quick commit

* ⚒️ Improvements + Addition

- Added `return type` for expressions and functions closes #4609
- Replaced new.html with docs.html which contains all the elements and `new` tab is a special case of docs.html with a special search filter
- Improved red box font color from black to background color (gray)
- Renamed `getNullOrEmptyDefault` method to `getDefaultIfNullOrEmpty` to make it clear
- Removed redundant assertions of `desc` and replaced them with one assertion in `handleIf` method as they should
- Added `Expression#getAcceptedChangeModes` to be used later for docs

* 🚀 Link return type section to their classes if found

- Known issues: Some return types such Long and Float does have a classinfo but not found in docs which leads to unknown links (might find a good solution later)

* 🚀 Change `force generate hooks` requirement

* Last touches

- Added search by description for some cases like `absorbed blocks` element has the word sponge only in its description
- Changed hash links scrolling to search filter (#ElementID would only match element of that ID), some browsers like chrome had bugs with scroll for some reason (probably lazy page loading)
- Little code cleanup
- Fixed minor bugs with search link handling
- Fixed element copy link including search params
- Fixed version filter wasn't handling the equal case properly

* Forgotten commits :)

- Fixed not named elements not checking for NoDoc annotation
- Fixed return type not checking for NO_DOC

* Fix #4429

* Fix searching by id for events

* Improve hash link handling

* Fix regex patterns for unsupported browsers

This error was causing most features from main.js not to work in some browsers such as Safari

* Apply suggestions from code review

Co-authored-by: TPGamesNL <29547183+TPGamesNL@users.noreply.github.com>

* Fix compilation

* Parts of the requested changes

- Other than most "colour" changes to "color" (only in visible places) the class ExprColoured has been changed to ExprColored since in the docs you can search for #ExprColored as an ID so it must match the others

* Docs: fix old info on dates - add new ways to get them

* Docs: fix old info on dates - more precisely

Co-authored-by: Ayham Al Ali <alali_ayham@yahoo.com>

* Requested Changes

* Update and rename ExprFormatTime.java to ExprFormatDate.java

- Minor correction to match objective of this expression

* Update main.js

* Tests bump

* Update src/main/java/ch/njol/skript/lang/function/Signature.java

Co-authored-by: APickledWalrus <apickledwalrus@gmail.com>

* Update docs/text.html

Co-authored-by: APickledWalrus <apickledwalrus@gmail.com>

* RC

* Build fix

* Discord RC - Part 1

* Improvements

- Delay examples click events to speed up page loading
- Remove bold style from side bar hovering
- Removed scrolling to element on link copy
- Filter new parse tags
- Improve output of returnType
- Cleaned up HTMLGenerator class a little

* Improvements 2

- Prevent scrolling on link copy (last try didn't work well)
- Added hash search support (if you have a hash it will be searched using search bar instead of scrolling to the element)

* Improvements 3

- Make description/pattern links open in the same tab rather than scrolling (because scrolling doesn't work anymore due to hash link search feature)
- Fix returnType if blocks not removed

* Fix copy link not working as expected

* Improvements 4

- Fix new parse tags syntax filter not working

* Improve inline code BG on white theme

* Stop cleaning patterns of classinfos

* RC 1

- Rename ExprColored back to ExprColoured (for safety because it's used in other places and addons might have been using it)

* Mark pages as English language

* Make Signature#originClassPath nullable in more places

* Filter Sections that are effect sections if isDocsPage

* Create fields and getters for docs and template directory

* Removed commented line

* Update Icons, favicon and logos

* Update src/main/java/ch/njol/skript/doc/Documentation.java

Co-authored-by: TPGamesNL <29547183+TPGamesNL@users.noreply.github.com>

* Update src/main/java/ch/njol/skript/doc/Documentation.java

Co-authored-by: TPGamesNL <29547183+TPGamesNL@users.noreply.github.com>

* Improvements

- Add ClassInfo#hasDocs method
- Add javadocs to sortedAnnotatedIterator
- Improve static field naming
- Remove some unneeded methods due to improvements
- Changed EffectSection section doc type from "Section" to "EffectSection"

* Move annotatedComparator field up

* Requested Changes

* Fix localStorage expiration date

* Fix build

* Add Cookies Accept Bottom Bar

- Cleaned up functions to be in their own file to remove duplicated code in theme-switcher.js and main.js

* Fix a quick error in cookies bar

* Fix cookies bar off-screen

* Improve styling of cookies bar

* Add keywords functionality

* Remove wildcard import

* Go in to manually fix conflicts

* Fix couple bugs ([on] & classes)

- Added arrow to tutorials navbar

Co-authored-by: TPGamesNL <29547183+TPGamesNL@users.noreply.github.com>
Co-authored-by: oskarkk <16339637+oskarkk@users.noreply.github.com>
Co-authored-by: DelayedGaming <72163224+DelayedGaming@users.noreply.github.com>
Co-authored-by: APickledWalrus <apickledwalrus@gmail.com>
Co-authored-by: Pikachu920 <28607612+Pikachu920@users.noreply.github.com>
Co-authored-by: LimeGlass <16087552+TheLimeGlass@users.noreply.github.com>
Co-authored-by: TheLimeGlass <seantgrover@gmail.com>
Co-authored-by: Moderocky <admin@moderocky.com>
@AyhamAl-Ali AyhamAl-Ali added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. documentation Related to Skript's official documentation. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

3 participants