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

Aliases - load temp aliases, when aliases are missing #4034

Merged
merged 1 commit into from May 26, 2021
Merged

Aliases - load temp aliases, when aliases are missing #4034

merged 1 commit into from May 26, 2021

Conversation

ShaneBeee
Copy link
Contributor

Description

This PR aims to create temporary aliases for missing materials. This will help future proof Skript during future Minecraft releases.
A small example was the release of Minecraft 1.16. When Spigot was released, we had to try to rush a release on Skript to have aliases available to users. The main problem here was these aliases were added to Skript 2.5-alpha versions.
Users who wish to stay on a stable release (ie: 2.4.1 at the time) would not have access to these new aliases.
With this change, and the introduction to BlockData recently, Skript users will not have to wait for a Skript update to use the new aliases.
This gives us more time to write/test new aliases for Skript, without having to worry about pushing out an update right away.

Notes:

  • I included ¦s as a temporary plural variant of each alias. Clearly this will NOT be perfect with some items which have a different plural spelling, but at least it helps with the main ones until we have time to write out the correct aliases for a release.
  • In the Aliases#loadMissingAliases() method, Im checking for the existence of Material#getKey(). This is due to the fact that these temp aliases will only ever be needed for future versions of Minecraft.
  • The debug message I made yellow, to stand out when we DO write aliases in the future and need to find out which ones are missing if we just so happen to miss one.

Example:

I removed a couple aliases to test, here is an example of how it would look in console during debug when an alias is missing:
Screen Shot 2020-07-30 at 6 27 46 PM


Target Minecraft Versions: the future
Requirements: none
Related Issues: none

@ShaneBeee ShaneBeee added 2.6 enhancement Feature request, an issue about something that could be improved, or a PR improving something. labels May 26, 2021
@ShaneBeee ShaneBeee merged commit cb2181e into SkriptLang:master May 26, 2021
@ShaneBeee ShaneBeee deleted the feature/temp-aliases branch May 26, 2021 17:42
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

1 participant