Idea from kaxyum
Create and use the Minecraft BedrockEdition Camera system.
NOTE: You MUST register CameraHandler
during plugin enable before you can begin creating CameraInstruction
instances.
if(!CameraHandler::isRegistered()){
CameraHandler::register($this);
}
(new CameraFadeInstruction())
->setTime(1, 1, 1)
->setColor(0, 0, 0)
->send($player);