Here is the English translation of the README in Markdown format.
XiaoNuoClean
XiaoNuoClean is a Minecraft Java Edition MOD for Fabric / NeoForge servers, designed to automatically clean up dropped items at scheduled intervals.
The build process generates separate JAR files for Fabric and NeoForge. Please select the appropriate file based on your server's mod loader. The current compatibility range for a single JAR is Minecraft 26.1.2 to 26.2.x.
Building
By default, the build will not resolve NeoForge dependencies, which is suitable for building the Fabric version only:
./gradlew build
To build the NeoForge version, you must explicitly enable the NeoForge module and ensure your network can access the NeoForge Maven repository:
./gradlew :neoforge:build -PincludeNeoForge=true --no-parallel --max-workers=1
Features
- Cleans up dropped items every 15 minutes by default.
- Broadcasts a warning message 10, 5, 4, 3, 2, and 1 seconds before cleaning.
- Supports persisting the cleanup schedule via
/xiaonuoclean clean on/off. - Configurable via
config/xiaonuoclean/config.json(language, interval, warning timings, and whitelist). - Server-side i18n support. Generates
zh-CNanden-USlanguage files by default; custom languages can be added. - Provides the
/xiaonuocleancommand (alias/xnc) to check status, reload config, clean immediately, and modify settings. - Items in the whitelist are ignored during cleanup (e.g.,
minecraft:diamondor shorthanddiamond).
Default Configuration
{
"language": "zh-CN",
"enabled": true,
"intervalSeconds": 900,
"warningSeconds": [10, 5, 4, 3, 2, 1],
"whitelist": []
}
Language files are located at:
config/xiaonuoclean/lang/<language>.json
For example, change "language" to "en-US" in the main config and run /xiaonuoclean reload to switch to English messages. To add a new language, place a JSON file with the corresponding name in this directory and reference it in the main configuration.
Commands
All /xiaonuoclean ... commands can be shortened to /xnc ....
/xiaonuoclean status
/xiaonuoclean reload
/xiaonuoclean clean
/xiaonuoclean clean on
/xiaonuoclean clean off
/xiaonuoclean interval <seconds>
/xiaonuoclean warnings set <seconds...>
/xiaonuoclean whitelist set
/xiaonuoclean whitelist add <item>
/xiaonuoclean whitelist remove <item>
/xiaonuoclean whitelist list
Modification commands require OP permissions.
The /xiaonuoclean whitelist set command can only be executed by an in-game OP/admin player; it reads the item ID from the executor's main hand and adds it to the whitelist. This command cannot be used from the console.
License
This project is open source under the GNU General Public License v3.0.
See LICENSE for details.

