A simple data pack that rewards players with experience levels for sleeping in a bed — no extra items, just a small incentive to rest safely through the night.
Whenever a player lies in a bed and the night is skipped, they receive XP based on the world's difficulty:
| Difficulty | Reward |
|---|---|
| Peaceful | None |
| Easy | 1 level |
| Normal | 3 levels |
| Hard | 5 levels |
To prevent abuse, each player can only be rewarded once every 12,000 ticks (about 10 real-world minutes) — enough to cover a full night, even during thunderstorms.
Reward messages are available in Portuguese (default), English, Spanish, French, German and Russian. This is a server-wide setting — run one of the following commands as an operator to change it:
/function sleepxp:lang/set_en → English
/function sleepxp:lang/set_es → Spanish
/function sleepxp:lang/set_fr → French
/function sleepxp:lang/set_de → German
/function sleepxp:lang/set_ru → Russian
/function sleepxp:lang/set_pt → Portuguese
The choice is saved in the world and persists across restarts.
sleepxp.zip file.datapacks folder:world/datapacks/saves/<world name>/datapacks//reload (or reopen the world).Built and tested for Minecraft Java Edition 26.3.
Icon and concept created specifically for this project.