Sleep Threshold Plugin
A Hytale plugin that modifies sleep behavior to allow sleeping when at least 50% of players are in bed, instead of requiring all players to be in bed.
Features
- Sleep triggers when 50% of players are in bed (configurable)
- Chat notifications showing sleep progress when threshold is not met
- Lists which players are sleeping and which are awake
Building
Build with Maven:
mvn clean package
The compiled JAR will be in the target/ directory.
Installation
- Build the plugin using Maven
- Place the JAR file in your Hytale server's plugins directory
- Restart the server or reload plugins
Configuration
The sleep threshold is set to 50% (0.5) by default. To change it, modify the SLEEP_THRESHOLD constant in CustomStartSlumberSystem.java:
private static final double SLEEP_THRESHOLD = 0.5; // Change to 0.3 for 30%, 0.7 for 70%, etc.
How It Works
The plugin replaces the built-in StartSlumberSystem with a custom implementation that:
- Checks if at least 50% of players are ready to sleep
- Sends status messages to all players when the threshold is not met
- Shows which players are sleeping and which are awake
Requirements
- Hytale Server (Java 25)
- Maven for building
