Skip to content

API to control Vibrant Visuals #6739

@DavyCraft648

Description

@DavyCraft648

Problem description

Currently, within the ResourcePacksPacketHandler code, the ResourcePacksInfoPacket is sent with forceDisableVibrantVisuals set to true.

This hardcoded value means that we have no direct way to enable or disable the Vibrant Visuals feature for players.

Proposed solution

We propose adding a mechanism for plugin developers to modify the value of forceDisableVibrantVisuals before the ResourcePacksInfoPacket is sent to the client. Here are a few potential approaches:

  • Introduce a new method within PlayerResourcePackOfferEvent, setForceDisableVibrantVisuals(bool $forceDisable) or setVibrantVisualsEnabled(bool $enabled), then pass it to the ResourcePacksPacketHandler.
  • Make forceDisableVibrantVisuals public in ResourcePacksInfoPacket

Alternative solutions or workarounds

Currently, the only known workaround involves using the DataPacketSendEvent in conjunction with Reflection or a closure hack to modify the forceDisableVibrantVisuals value within the packet. Plugin developers can't rely on this method as it's fragile and has no official backing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Category: APIRelated to the plugin APIEasy taskProbably really easy to do, good task for first-time contributors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions