-
-
Notifications
You must be signed in to change notification settings - Fork 389
Housekeeping: remove unneeded legacy version checks & clean up code. #6676
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
base: dev/feature
Are you sure you want to change the base?
Conversation
* Remove deprecated visibility method use. * Remove support checks from block change. * Fix mistake in SendTitle (and remove 1.13 warnings). * Remove check from make fly.
if (Skript.methodExists(Player.class, "hasResourcePack")) | ||
register(CondHasResourcePack.class, PropertyType.HAVE, "[a] resource pack [(loaded|installed)]", "players"); | ||
register(CondHasResourcePack.class, PropertyType.HAVE, "[a] resource pack [(loaded|installed)]", "players"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this still require the check? I can't see the Player#hasResourcePack() in Spigot 1.13.2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the fact @RequiredPlugins
state "Paper 1.9 or newer" it is possible. As such I did go and check latest spigot releases and there's no method for hasResourcePack
so this check should still remain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this was only on the list for documentation update
if (Skript.methodExists(Creeper.class, "isIgnited")) { | ||
Skript.registerCondition(CondIgnitionProcess.class, | ||
"[creeper[s]] %livingentities% ((is|are)|1¦(isn't|is not|aren't|are not)) going to explode", | ||
"[creeper[s]] %livingentities% ((is|are)|1¦(isn't|is not|aren't|are not)) in the (ignition|explosion) process", | ||
"creeper[s] %livingentities% ((is|are)|1¦(isn't|is not|aren't|are not)) ignited"); | ||
} | ||
Skript.registerCondition(CondIgnitionProcess.class, | ||
"[creeper[s]] %livingentities% ((is|are)|1¦(isn't|is not|aren't|are not)) going to explode", | ||
"[creeper[s]] %livingentities% ((is|are)|1¦(isn't|is not|aren't|are not)) in the (ignition|explosion) process", | ||
"creeper[s] %livingentities% ((is|are)|1¦(isn't|is not|aren't|are not)) ignited"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This as well.
Removed some redundant existing checks and some other changes - Happy to revert other changes (changes that aren't only the existing checks) if they're out of the scope of this PR (6676)
* Removed some redundant exists checks and made formatting more consistent in SimpleEvents * Removed unused imports * Put back the potiondata method handles --- Co-authored-by: Moderocky <admin@moderocky.com>
…ses (#6693) * Removed PassengerUtils class and replaced methods in referencing classes * Apply suggestions from code review * Formatting stuff --------- Co-authored-by: Moderocky <admin@moderocky.com>
Can this PR just be used for the 2.10 stuff as well, seeing as it wasn't merged with 2.9? Or should there be a new one for the 2.10 stuff? |
Description
This is the batch merge request for #6641.
It removes checks for methods existing that are standard as of 1.13.2, since we no longer support versions below this.
What can be removed?
Version checks for 1.13 and lower. Method & class existence checks that were standard as of Spigot for 1.13.2. Paper-only checks are still required for a few things that didn't arrive in Spigot until later (or at all).
See the linked issue #6641 for more details.
If you want to contribute to this project, open a pull request targeting
remove-legacy-code
and it will be included in this pull request.What next?
Another clean-up can be done before 2.10 for things under 1.17.
This will include a few bits and pieces that couldn't be fully cleaned up in this PR.
This is a branch merge request!
Individual pull requests were made by contributors to its feature branch: this can be merged as-is to preserve the Git change history.
Target Minecraft Versions: any
Requirements: none
Related Issues: #6641