Aliases - load temp aliases, when aliases are missing #4034
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
¦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.Aliases#loadMissingAliases()
method, Im checking for the existence ofMaterial#getKey()
. This is due to the fact that these temp aliases will only ever be needed for future versions of Minecraft.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:
Target Minecraft Versions: the future
Requirements: none
Related Issues: none