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 minor issues with show_entity hover in messages #3908

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

Anna-28
Copy link

@Anna-28 Anna-28 commented Oct 27, 2023

The entity name was being used instead of the entity type, causing the type to not be shown to the user unless it happened to be the same as the entity name.

And in some cases such as an entity type (or name, before these changes) being "Player" it would cause an null pointer exception and not send the message at all.

… in hover

EntityList does not contain all possible entity types. It does not contain entries for:
FishingHook, lightning, Weather, Player, or ComplexPart.
Trying to use a hover show entity of one of these types would cause a null pointer exception.
And before the previous commit the type was actually the name.
Which caused showing entities with a name of "Player" or one of the other types mentioned above to cause this error.
Preventing the message from being sent.
@zml2008 zml2008 added type: bug Something isn't working version: 1.12 (u) API: 7 (unsupported since May 21st 2021) system: text labels Oct 27, 2023
@ImMorpheus
Copy link
Contributor

Thanks!

API 7 is EOL but the old Text API is no longer available in API 8+ because we're now using kyori.

This looks ok so I guess we can merge it.

Note: this is untested.

@ImMorpheus ImMorpheus merged commit b42ffa2 into SpongePowered:stable-7 Nov 3, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system: text type: bug Something isn't working version: 1.12 (u) API: 7 (unsupported since May 21st 2021)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants