HomeJavaModsAtsCleaner
AtsCleaner

🧹 AtsCleaner

A simple Fabric entity cleanup mod that periodically cleans dropped items and specific entities in Minecraft servers to prevent server lag.

✨ Features

💻 Command Reference

All commands require OP permission level 4. The base command is /ats-cleaner.

🧹 Cleanup Operations

⚙️ Configuration Management

📁 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:

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:

🌐 Supported Languages

The mod currently supports:

📦 Installation

  1. Ensure your server is running Fabric, currently supports Minecraft 1.20.1. If you need other versions, please submit an Issue on GitHub
  2. Download the mod JAR file
  3. Place it in your server's mods folder
  4. Restart the server
  5. 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:

❓ 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!


🧹 AtsCleaner

一个简单的 Fabric 实体清理模组,定期清理 Minecraft 服务器中的掉落物和特定实体,防止服务器卡顿。

✨ 支持的功能

💻 指令解释

所有指令都需要 OP 权限等级 4。基础指令为 /ats-cleaner

🧹 清理操作

⚙️ 配置管理

📁 配置文件

配置文件位于 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 中的每个实体包含:

特殊 name:使用 "dontshow" 可以清理实体但不在清理报告中显示。

🛡️ 保护规则

模组只会清理满足以下所有条件的实体:

🌐 支持的语言

模组目前支持:

📦 安装方法

  1. 确保你的服务端为 Fabric,目前支持 Minecraft 1.20.1,如果你需要其他版本,请在 GitHub 上提交 Issue
  2. 下载模组 JAR 文件
  3. 放入服务器的 mods 文件夹
  4. 重启服务器
  5. 使用指令或编辑配置文件来配置模组

📖 使用示例

# 设置清理间隔为 10 分钟
/ats-cleaner config interval 600

# 启用动作栏消息
/ats-cleaner config actionbar enable

# 设置语言为中文
/ats-cleaner config language zh_cn

# 执行手动清理
/ats-cleaner clean

# 查看当前配置
/ats-cleaner config view

⏰ 清理过程

模组在清理前会发送多次提示:

❓ 常见问题

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!

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more