DropSweeper ?
简介
受够了服务器里物品堆积如山,却又讨厌手动清理?担心误删珍贵资源?
隆重介绍 dropsweeper,这是一款专为 Minecraft 26.1.2 (Fabric) 量身定制的智能拾取模组!
它按照设定的时间间隔自动清扫世界中的掉落物,并化身友好的“女仆 / 扫地酱”形象广播提示信息。在保持服务器整洁流畅的同时,确保你重要的装备不会丢失。
本模组完全基于原生 Fabric API 实现。无需安装任何服务端插件或依赖模组——即插即用。
命令
所有命令均以 /dropsweeper 为根节点:
/dropsweeper items – 清扫当前世界中所有的掉落物。
/dropsweeper items all – 清扫所有世界中的掉落物。
/dropsweeper items <world> – 清扫指定世界中的掉落物(支持 Tab 补全)。
/dropsweeper dustbin – 打开默认的垃圾箱(索引 0)。
/dropsweeper dustbin <index> – 打开指定索引的垃圾箱。
/dropsweeper whitelist add <item> – 将某物品加入白名单(永不清扫)。
/dropsweeper whitelist remove <item> – 从白名单中移除某物品。
/dropsweeper whitelist list – 列出所有白名单物品。
/dropsweeper blacklist add <item> – 将某物品加入黑名单(清扫但直接销毁,不存入垃圾箱)。
/dropsweeper blacklist remove <item> – 从黑名单中移除某物品。
/dropsweeper blacklist list – 列出所有黑名单物品。
/dropsweeper config reload – 热重载配置文件以立即生效。
特性
- 智能清扫: 按设定间隔自动运行(默认:600 秒),也可通过命令手动即时触发。
- 白名单与黑名单: 支持白名单(永不清除;默认保护 下界之星 和 重核)和黑名单(清除但销毁;默认针对 圆石、沙子 和 砾石)。
- 通配符匹配: 支持
modid:* 通配符以便轻松批量管理(可禁用)。
- 多垃圾箱存储: 默认包含 1 个 54 格的箱子,可在配置中扩展至 N 个垃圾箱。采用 FIFO(先进先出)机制,当垃圾箱满时自动丢弃最早存入的物品。
- 数据持久化: 垃圾箱数据通过 NBT 持久化保存,并在服务器重启后保留。向后兼容旧版单箱存档数据。
- 额外实体清扫: 支持清理其他类型的实体,如箭、光灵箭和经验球(实体类型完全可配置)。
- 防卡顿预警: 当单个区块内的物品积累超过阈值(默认:640)时,自动向 OP 发出警告以防止服务器卡顿。每个区块的警告频率限制为每 10 分钟一次。
- 精美的广播提示: 长倒计时(默认:60/30/15 秒)显示在操作栏(ActionBar)上以避免刷屏聊天;短倒计时(默认:≤3 秒)则直接在聊天框弹出以提高可见度。
- 交互式完成反馈: 清扫完成后会显示非空垃圾箱的数量;点击数字即可瞬间打开对应的箱子。
- 自定义人格: 拥有友好的“扫地酱”人格用于本地化广播文本,且完全可定制。
- 可配置的权限: 权限等级(0-4)直接映射到 MC 26.1.2 的
Permissions 系统。
- 热重载: 配置更改即时生效。更改垃圾箱数量时会自动同步(如果截断非空垃圾箱则会触发警告)。
配置文件
配置文件位于 config/dropsweeper.json,并在首次启动时自动生成。以下是关键字段说明:
| 字段 |
默认值 |
描述 |
sweepIntervalSeconds |
600 |
自动清扫间隔(秒)。设为 0 以禁用。 |
dustbinCount |
1 |
垃圾箱总数(每个垃圾箱 54 格)。 |
dustbinName |
"Dustbin " |
垃圾箱 UI 标题的前缀。最终名称将显示为 "Dustbin N"。 |
itemWhitelist |
[nether_star, heavy_core] |
永远不会被清扫的物品。 |
itemBlacklist |
[cobblestone, sand, gravel] |
会被清除但不会放入垃圾箱的物品。 |
matchWildcard |
true |
启用对 modid:* 通配符模式的支持。 |
itemOverloadThreshold |
640 |
触发 OP 警告的单个区块物品阈值。设为 0 以禁用。 |
extraEntityTypes |
[arrow, spectral_arrow, experience_orb] |
清理过程中要清扫的其他实体类型。 |
permissionLevelDustbin |
0 |
打开垃圾箱所需的最低权限等级。 |
permissionLevelClean |
2 |
触发手动清扫所需的最低权限等级。 |
announcePointsLong |
[120, 60, 30] |
触发长格式倒计时警告的时间戳(秒)。 |
announceShortThreshold |
3 |
短倒计时的阈值(剩余时间 ≤ N 时每秒发送一次警告)。 |
announcementChannel |
见配置 |
配置 long(长)、short(短)和 complete(完成)广播是路由到 actionbar(操作栏)还是 chat(聊天)。 |
DropSweeper ?
Introduction
Tired of items piling up like mountains in your server but hate clearing them manually? Worried about accidentally wiping out valuable resources?
Introducing dropsweeper, a smart item-sweeping mod custom-built for Minecraft 26.1.2 (Fabric)!
It automatically sweeps up dropped items in your world at set intervals, using a friendly "Maid / Sweeper-chan" persona to broadcast tips. It keeps your server clean and lag-free without losing any of your important gear.
This mod is fully implemented using the native Fabric API. It requires no server plugins or dependency mods—just plug and play.
Commands
All commands start with the base node /dropsweeper:
/dropsweeper items – Sweeps all dropped items in the current world.
/dropsweeper items all – Sweeps dropped items across all worlds.
/dropsweeper items <world> – Sweeps dropped items in a specified world (supports Tab completion).
/dropsweeper dustbin – Opens the default dustbin (Index 0).
/dropsweeper dustbin <index> – Opens the dustbin with the specified index.
/dropsweeper whitelist add <item> – Adds an item to the whitelist (never swept).
/dropsweeper whitelist remove <item> – Removes an item from the whitelist.
/dropsweeper whitelist list – Lists all whitelisted items.
/dropsweeper blacklist add <item> – Adds an item to the blacklist (swept but destroyed instead of sent to dustbins).
/dropsweeper blacklist remove <item> – Removes an item from the blacklist.
/dropsweeper blacklist list – Lists all blacklisted items.
/dropsweeper config reload – Hot-reloads the configuration file for immediate effect.
Features
- Smart Sweeping: Automatically runs at set intervals (default: 600 seconds) or can be manually triggered instantly via commands.
- White & Blacklists: Supports a Whitelist (never cleared; safeguards Nether Star and Heavy Core by default) and a Blacklist (cleared but destroyed; targets Cobblestone, Sand, and Gravel by default).
- Wildcard Matching: Supports
modid:* wildcards for easy bulk management (can be disabled).
- Multi-Dustbin Storage: Features 1 large 54-slot chest by default, expandable to N bins in the config. Uses a FIFO (First-In, First-Out) system to automatically eject the oldest items when full.
- Persistent Data: Dustbin data is persisted via NBT and survives server restarts. Backwards compatible with older single-bin save data.
- Extra Entity Sweeping: Supports clearing additional entities like arrows, spectral arrows, and experience orbs (entity types are fully configurable).
- Lag Prevention Alerts: Automatically alerts OPs when item accumulation in a single chunk exceeds a threshold (default: 640) to prevent server lag. Warnings are throttled to once every 10 minutes per chunk.
- Polished Broadcasts: Long countdowns (default: 60/30/15s) display on the ActionBar to avoid chat spam, while short countdowns (default: ≤3s) pop up directly in chat for high visibility.
- Interactive Completion: Displays non-empty dustbin numbers right after a sweep; click the number to instantly open that specific chest.
- Custom Persona: Features a friendly "Sweeper-chan" persona for localized broadcast text, which is fully customizable.
- Configurable Permissions: Permission levels (0-4) map directly to MC 26.1.2's
Permissions system.
- Hot-reloading: Configuration changes reload instantly. Automatically syncs when changing the dustbin count (triggers a warning if truncating a non-empty bin).
Configuration File
The configuration file is located at config/dropsweeper.json and is automatically generated on the first startup. Below are the key fields:
| Field |
Default Value |
Description |
sweepIntervalSeconds |
600 |
Automated sweeping interval (seconds). Set to 0 to disable. |
dustbinCount |
1 |
Total number of dustbins (54 slots per bin). |
dustbinName |
"Dustbin " |
The prefix for the dustbin UI title. The final name will appear as "Dustbin N". |
itemWhitelist |
[nether_star, heavy_core] |
Items that will never be swept. |
itemBlacklist |
[cobblestone, sand, gravel] |
Items that are cleared but will not be placed in dustbins. |
matchWildcard |
true |
Enables support for the modid:* wildcard pattern. |
itemOverloadThreshold |
640 |
The item threshold per single chunk to trigger an OP warning. Set to 0 to disable. |
extraEntityTypes |
[arrow, spectral_arrow, experience_orb] |
Additional entity types to be swept during cleanup. |
permissionLevelDustbin |
0 |
Minimum permission level required to open a dustbin. |
permissionLevelClean |
2 |
Minimum permission level required to trigger a manual sweep. |
announcePointsLong |
[120, 60, 30] |
Timestamps (in seconds) to trigger long-form countdown warnings. |
announceShortThreshold |
3 |
Threshold for short countdowns (sends a warning every second when remaining time ≤ N). |
announcementChannel |
See Config |
Configures whether the long, short, and complete announcements route to the actionbar or chat. |
评论 0
登录后参与评分
还没有评论,来抢沙发吧