You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Problem description
Currently, within the
ResourcePacksPacketHandlercode, theResourcePacksInfoPacketis sent withforceDisableVibrantVisualsset to true.PocketMine-MP/src/network/mcpe/handler/ResourcePacksPacketHandler.php
Line 124 in 9c71f4f
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
forceDisableVibrantVisualsbefore theResourcePacksInfoPacketis sent to the client. Here are a few potential approaches:PlayerResourcePackOfferEvent,setForceDisableVibrantVisuals(bool $forceDisable)orsetVibrantVisualsEnabled(bool $enabled), then pass it to theResourcePacksPacketHandler.forceDisableVibrantVisualspublic inResourcePacksInfoPacketAlternative solutions or workarounds
Currently, the only known workaround involves using the
DataPacketSendEventin conjunction with Reflection or a closure hack to modify theforceDisableVibrantVisualsvalue within the packet. Plugin developers can't rely on this method as it's fragile and has no official backing.