Question Creating a "Dream" Sleep Effect: Fade‐to‐Black + Silent Teleport Without Skipping Night

Koziorus

New member
Apr 30, 2025
1
0
1
Problem Description
I’m trying to make a plugin so that when a player goes to sleep:


  1. They get the usual horizontal pose and fade‐to‐black animation
  2. Do not skip the night
  3. While the screen is black, the player is teleported “behind the scenes” (as if they entered a dream)
  4. The screen then fades back in—all without the player noticing the teleport itself



What Actually Happens


  • I can detect the PlayerBedEnterEvent and force the sleep pose
  • I cannot find any Paper API or NMS method/packet that triggers the client fade‐to‐black or fade‐back



Server & Development Environment


  • Minecraft: 1.21.4
  • Server software: Paper 1.21.4
  • Java: 17



What I’ve Tried So Far


  1. Inspecting Paper’s API for any “fade” or “screen effect” methods (no matches)
  2. Reviewing EntityPlayer and PlayerConnection NMS methods for hidden screen controls



Expected vs. Actual Behavior


  • Expected:
    • Client fades to black
    • Plugin silently teleports the player
    • Client fades back in
    • Night remains unskipped
  • Actual:
    • No fade effect occurs
    • Teleport happens immediately in view

Thank you for taking the time to read and help!