Skip to content

Add Entity Visibility API #5973

@Janmm14

Description

@Janmm14

Is your feature request related to a problem?

Right now, per-player entities are done mostly with sending packets. This is a hacky and unreliable way and requires either NMS or ProtocolLib usage and is prone to break with minecraft updates.

Describe the solution you'd like.

I'd like Paper to expand upon the Player#hidePlayer and Player#showPlayer methods with new methods Player#showEntity(Entity), Player#hideEntity(Entity) and Player#canSee(Entity) as well as overloading World#spawn methods with a boolean shownByDefault and adding method Entity#setShownByDefault and Entity#isShownByDefault.

Describe alternatives you've considered.

none

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I have ensured the feature I'm requesting isn't already in the latest supported Paper build.

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution: invalidIssue or Request has no basis.status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions