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

Preventing NPE caused by creation of PlayerProfile from OfflinePlayer #7091

Merged

Conversation

Pesekjak
Copy link
Contributor

Description

There's currently a bug when setting the profile of a skull using an OfflinePlayer without a username. SkullMeta#setOwningPlayer(OfflinePlayer) do not check if the username is present and still creates a new GameProfile, leading to a NPE. This PR addresses the issue by providing an alternative player profile with empty username.

Although this has been fixed in SPIGOT-7882 (the same way I did here), the bug persists in older versions supported by Skript.


Target Minecraft Versions: any
Requirements: none
Related Issues: #7090

@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.9 Targeting a 2.9.X version release labels Sep 18, 2024
@Efnilite Efnilite added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Sep 20, 2024
@UnderscoreTud UnderscoreTud merged commit 875a39b into SkriptLang:dev/patch Oct 1, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.9 Targeting a 2.9.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants