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

Fix exception when the location has no world in ExprBlocks. #6589

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

Moderocky
Copy link
Member

@Moderocky Moderocky commented Apr 19, 2024

Description

The other cases all check if the world exists and return null if not, but the direction case checks only the direction and not the world, so this fails later on in the iterator if there isn't a world.

I followed what the other cases do and return null if the world is null.

I also added an isWorldLoaded filter to the getter, which should be okay since it checks if the world is null and if Bukkit has actually initialised the world.


Target Minecraft Versions: any
Requirements: none
Related Issues: closes #6480, closes #6479

@Moderocky Moderocky added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.8 Targeting a 2.8.X version release labels Apr 19, 2024
@Moderocky Moderocky merged commit 0a679e2 into SkriptLang:dev/patch Apr 19, 2024
4 checks passed
@Moderocky Moderocky deleted the fix-6480 branch April 19, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8 Targeting a 2.8.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants