# Sleepie(睡眠派)
**Sleepie** is a lightweight server-side Fabric mod that warns players when their sleep statistics make them eligible for phantom attacks.
The name **Sleepie** was inspired by **HunterPie**, an overlay plugin for *Monster Hunter*.
> **Server required, client optional.**
Players without Sleepie installed on their clients can still join the server and receive all notifications normally.
## Features
- Checks each player's vanilla `time_since_rest` statistic.
- Sends a global warning when phantom-eligible players are detected.
- Supports separate messages for one player and multiple players.
- Uses the longest sleepless time among eligible Overworld players.
- Separates players in the Overworld from players in other dimensions.
- Players in the Nether, the End, or other dimensions are listed as safe from phantom attacks.
- Sends a warning when the normal sleeping period begins.
- Sends an additional warning when a thunderstorm begins.
- Displays personal reminders through the Action Bar.
- Displays notification settings and days since last sleep whenever a player joins.
- Stores each player's notification preferences persistently.
- Uses vanilla chat and Action Bar packets without requiring a client-side installation.
## Commands
All commands are available to regular players.
### `/sleepie`
Displays the player's current notification settings.
### `/sleepie disable`
Stops global phantom warnings from being shown to the player.
### `/sleepie enable`
Allows the player to receive global phantom warnings again.
### `/sleepie self`
Toggles personal Action Bar reminders.
Global warnings and personal reminders are independent. For example, a player can disable global warnings while keeping personal reminders enabled.
## Default Settings
- Global warnings: **Enabled**
- Personal reminders: **Disabled**
## Localization
Built-in languages include:
- Simplified Chinese
- Traditional Chinese (Hong Kong)
- Traditional Chinese (Taiwan)
- English
- Literary Chinese
All player-visible text uses translation keys.
The server selects a localized fallback according to each player's language setting. This means clients without Sleepie installed can still receive localized messages.
## Compatibility
- Minecraft: **26.2**
- Mod Loader: **Fabric**
- Environment: **Server required, client optional**
- Required dependency: **Fabric API**
- Java: **25**
## Source Code and Issues
Sleepie is open source under the **MIT License**.
Source code and issue tracking are available through the project's GitHub repository.

