Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
🧹 AtsCleaner
A simple Fabric entity cleanup mod that periodically cleans dropped items and specific entities in Minecraft servers to prevent server lag.
✨ Features
- 🕒 Automatic Cleaning: Automatically clean entities at configured intervals
- 🎯 Smart Filtering: Only cleans entities without owners and custom names
- 🐾 Pet Protection: Protects tamed animals and named entities
- ✅ Mod Compatibility: Supports mod entities through namespace identification
- 🎮 Cobblemon Compatible: Skips Pokémon in battle (entities with BattleId tag)
- 🌍 Multi-language Support: Built-in internationalization support
- 📊 Detailed Reports: Shows cleanup statistics by dimension
- ⚙️ Command Management: Complete configuration management via commands
- 🔄 Hot Reload: Reload configurations without server restart
💻 Command Reference
All commands require OP permission level 4. The base command is /ats-cleaner.
🧹 Cleanup Operations
/ats-cleaner clean- Execute manual cleanup immediately
⚙️ Configuration Management
/ats-cleaner reload- Reload configuration from file/ats-cleaner config view- Display current configuration/ats-cleaner config interval <seconds>- Set cleanup interval (60-86400 seconds)/ats-cleaner config language <language>- Set mod language (currently supports en_us, zh_cn)/ats-cleaner config actionbar enable- Enable cleanup action bar messages/ats-cleaner config actionbar disable- Disable cleanup action bar messages
📁 Configuration File
The configuration file is located at config/ats-cleaner.json:
{
"clean_interval": 600,
"language": "en_us",
"show_cleanup_actionbar": true,
"clean_entities": [
{
"id": "minecraft:item",
"name": "items"
},
{
"id": "minecraft:experience_orb",
"name": "experience orbs"
},
{
"id": "minecraft:zombie",
"name": "dontshow"
},
{
"id": "minecraft:skeleton",
"name": "dontshow"
},
{
"id": "minecraft:creeper",
"name": "dontshow"
},
{
"id": "minecraft:enderman",
"name": "dontshow"
}
]
}
📋 Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
clean_interval |
Integer | 600 | Cleanup interval in seconds |
language |
String | "en_us" | Mod language |
show_cleanup_actionbar |
Boolean | true | Whether to show cleanup messages in action bar |
clean_entities |
Array | [] | List of entity types to clean |
🎯 Entity Configuration
Each entity in clean_entities contains:
id: Minecraft entity ID (e.g., "minecraft:zombie", supports mod entity IDs)name: Display name (e.g., "zombies")
Special name: Use "dontshow" to clean entities without displaying them in cleanup reports.
🛡️ Protection Rules
The mod only cleans entities that meet ALL these criteria:
- ✅ Entity is in the configuration list
- ✅ Entity has no owner (not tamed)
- ✅ Entity has no custom name (not named with name tags)
- ✅ Cobblemon compatibility: Entity has no BattleId NBT tag (not in Cobblemon battle)
🌐 Supported Languages
The mod currently supports:
- English (
en_us) - Simplified Chinese (
zh_cn)
📦 Installation
- Ensure your server is running Fabric, currently supports Minecraft 1.20.1. If you need other versions, please submit an Issue on GitHub
- Download the mod JAR file
- Place it in your server's
modsfolder - Restart the server
- Configure the mod using commands or by editing the configuration file
📖 Usage Examples
# Set cleanup interval to 10 minutes
/ats-cleaner config interval 600
# Enable action bar messages
/ats-cleaner config actionbar enable
# Set language to Chinese
/ats-cleaner config language zh_cn
# Execute manual cleanup
/ats-cleaner clean
# View current configuration
/ats-cleaner config view
⏰ Cleanup Process
The mod sends multiple notifications before cleanup:
- 10 minutes, 5 minutes, 3 minutes, 1 minute: Chat message notifications
- 30 seconds: Action bar countdown begins
- 20-11 seconds: Action bar countdown color changes
- 10-1 seconds: Action bar countdown color changes, chat message notification
- 0 seconds: Execute cleanup
❓ Frequently Asked Questions
Q: Will this clean pets or named entities?
A: No, the mod only cleans entities without owners and without custom names.
Q: What does Cobblemon compatibility mean?
A: When writing this mod, there was a use case on the server at the time: periodically cleaning Pokémon. However, we couldn't clean Pokémon that were in battle, so there's a specific check for Cobblemon's BattleId tag to skip Pokémon in battle. If you don't know what this is or don't play the Cobblemon mod, you can ignore this feature.
Q: How do I disable action bar messages?
A: Use /ats-cleaner config actionbar disable to turn off action bar messages, though chat warnings will not be disabled.
Q: What does "dontshow" in the name field mean?
A: When you set an entity's name to "dontshow", the mod will still clean those entities but won't display them in the cleanup results. Use this feature if you want to silently clean certain entities.
Q: How do I add custom entities for cleaning?
A: Edit the clean_entities array in the configuration file, adding objects with id (entity ID) and name (display name) values.
Q: How do I add my own language? How do I modify default message text?
A: Open the mod with archive software, and add or modify language files directly in the assets/atscleaner/lang folder. File format should be <language_code>.json. After adding a new language, add your language file name to languages.txt in the same directory, then set language to your language code in the configuration file. We welcome language file submissions via PR on GitHub!
Q: Where is the configuration file located?
A: The configuration file is located at config/ats-cleaner.json in your server's root directory.
🤝 Contributing
PRs are always welcome!
- Version migrations
- New language translations
- Bug fixes
- Feature improvements
- Documentation updates
🧹 AtsCleaner
一个简单的 Fabric 实体清理模组,定期清理 Minecraft 服务器中的掉落物和特定实体,防止服务器卡顿。
✨ 支持的功能
- 🕒 自动清理:按配置的间隔时间自动清理实体
- 🎯 智能过滤:只清理无主人且无自定义名称的实体
- 🐾 宠物保护:保护驯服的动物和命名的实体
- ✅ 模组兼容: 通过命名空间识别实体,理论上支持模组的实体
- 🎮 Cobblemon 兼容:跳过战斗中的宝可梦(带有 BattleId 标签的实体)
- 🌍 多语言支持:内置国际化支持
- 📊 详细报告:按维度显示清理统计信息
- ⚙️ 指令管理:通过指令完整管理配置
- 🔄 热重载:无需重启服务器即可重新加载配置
💻 指令解释
所有指令都需要 OP 权限等级 4。基础指令为 /ats-cleaner。
🧹 清理操作
/ats-cleaner clean- 立即执行手动清理
⚙️ 配置管理
/ats-cleaner reload- 从文件重新加载配置/ats-cleaner config view- 显示当前配置/ats-cleaner config interval <秒数>- 设置清理间隔(60-86400 秒)/ats-cleaner config language <语言>- 设置模组语言(目前支持 en_us, zh_cn)/ats-cleaner config actionbar enable- 启用清理动作栏消息/ats-cleaner config actionbar disable- 禁用清理动作栏消息
📁 配置文件
配置文件位于 config/ats-cleaner.json:
{
"clean_interval": 600,
"language": "zh_cn",
"show_cleanup_actionbar": true,
"clean_entities": [
{
"id": "minecraft:item",
"name": "个掉落物"
},
{
"id": "minecraft:experience_orb",
"name": "个经验球"
},
{
"id": "minecraft:zombie",
"name": "dontshow"
},
{
"id": "minecraft:skeleton",
"name": "dontshow"
},
{
"id": "minecraft:creeper",
"name": "dontshow"
},
{
"id": "minecraft:enderman",
"name": "dontshow"
}
]
}
📋 配置选项说明
| 选项 | 类型 | 默认值 | 描述 |
|---|---|---|---|
clean_interval |
整数 | 600 | 清理间隔时间(秒) |
language |
字符串 | "en_us" | 模组语言 |
show_cleanup_actionbar |
布尔值 | true | 是否在动作栏显示清理消息 |
clean_entities |
数组 | [] | 要清理的实体类型列表 |
🎯 实体配置
clean_entities 中的每个实体包含:
id:Minecraft 实体 ID(例如:“minecraft:zombie”,支持模组实体 ID)name:显示的名称(例如:“个僵尸”,对于中文语境,“个”为量词,可以保证语句通顺)
特殊 name:使用 "dontshow" 可以清理实体但不在清理报告中显示。
🛡️ 保护规则
模组只会清理满足以下所有条件的实体:
- ✅ 实体在配置列表中
- ✅ 实体无主人(未驯服)
- ✅ 实体无自定义名称(未用命名牌命名)
- ✅ Cobblemon 兼容:实体无 BattleId NBT 标签(不在 Cobblemon 战斗中)
🌐 支持的语言
模组目前支持:
- English (
en_us) - 简体中文 (
zh_cn)
📦 安装方法
- 确保你的服务端为 Fabric,目前支持 Minecraft 1.20.1,如果你需要其他版本,请在 GitHub 上提交 Issue
- 下载模组 JAR 文件
- 放入服务器的
mods文件夹 - 重启服务器
- 使用指令或编辑配置文件来配置模组
📖 使用示例
# 设置清理间隔为 10 分钟
/ats-cleaner config interval 600
# 启用动作栏消息
/ats-cleaner config actionbar enable
# 设置语言为中文
/ats-cleaner config language zh_cn
# 执行手动清理
/ats-cleaner clean
# 查看当前配置
/ats-cleaner config view
⏰ 清理过程
模组在清理前会发送多次提示:
- 10 分钟、5 分钟、3 分钟、1 分钟:聊天消息提示
- 30 秒:动作栏倒计时开始
- 20-11 秒:动作栏倒计时变色
- 10-1 秒:动作栏倒计时变色,聊天消息提示
- 0 秒:执行清理
❓ 常见问题
Q: 会清理宠物或命名的实体吗?
A: 不会,模组只清理无主人且无自定义名称的实体。
Q: 与 Cobblemon 兼容是什么意思?
A: 因为在写这个模组时,当时的服务器有一个应用场景:定时清理宝可梦。但是因为正在战斗中的宝可梦不能被清理,所以专门写了一个检查 Cobblemon BattleId 标签的功能,防止误清。如果你不知道这是什么,也不玩 Cobblemon 模组,忽略即可。
Q: 如何禁用动作栏消息吗?
A: 使用 /ats-cleaner config actionbar disable 关闭动作栏消息,不过聊天内的警告不会被禁用。
Q: name 中的 "dontshow" 是什么意思?
A: 当你将实体的 name 设置为 "dontshow" 时,模组仍会清理这些实体,但不会在清理结果中显示。如果你想静默清理某个实体,可以使用此功能。
Q: 如何添加自定义实体进行清理?
A: 编辑配置文件中的 clean_entities 数组,添加包含 id(实体 ID)和 name(要显示的名称)的值。
Q: 如何添加自己的语言?如何修改默认的提示文字?
A: 将模组使用压缩软件打开,在路径为 assets/atscleaner/lang 文件夹中直接添加或修改语言文件即可,文件格式为 <语言代码>.json。添加新语言后需要在同目录下的
languages.txt 中添加你的语言文件名,最后在配置文件中设置 language 为你的语言代码即可。欢迎在 GitHub 通过 PR 提交你的语言文件!
Q: 配置文件在哪里?
A: 配置文件位于服务器根目录的 config/ats-cleaner.json。
🤝 贡献
随时欢迎提交 PR!
- 版本迁移
- 新语言翻译
- Bug 修复
- 功能改进
- 文档更新


