-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Labels
Category: APIRelated to the plugin APIRelated to the plugin APIEasy taskProbably really easy to do, good task for first-time contributorsProbably really easy to do, good task for first-time contributors
Description
Problem description
Currently, within the ResourcePacksPacketHandler code, the ResourcePacksInfoPacket is sent with forceDisableVibrantVisuals set to true.
| forceDisableVibrantVisuals: 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)orsetVibrantVisualsEnabled(bool $enabled), then pass it to theResourcePacksPacketHandler. - Make
forceDisableVibrantVisualspublic inResourcePacksInfoPacket
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.
StefanFox-Dev, Benedikt05, DaisukeDaisuke and ItzxDwi
Metadata
Metadata
Assignees
Labels
Category: APIRelated to the plugin APIRelated to the plugin APIEasy taskProbably really easy to do, good task for first-time contributorsProbably really easy to do, good task for first-time contributors