InventorySwap
InventorySwap 是一款轻量级插件,它会按照可配置的时间间隔,随机轮换在线玩家之间的物品栏。无需数据库,没有冗余功能。只为在特定时刻带来混乱。
非常适合用于 SMP 服务器、活动或任何希望让玩家保持警惕的游戏模式。
工作原理
每个玩家的屏幕上方操作栏都会显示倒计时。当倒计时归零时,所有玩家的物品栏(包括护甲、手持物品和副手物品)将会进行轮换。系统会播放标题公告并伴有音效提示。随后计时器重置并重新开始。
命令
所有命令均需 inventoryswap.admin 权限。
| 指令 |
描述 |
/invswap interval <seconds> |
设置交换触发的间隔时间(秒) |
/invswap minplayers <n> |
触发交换所需的最少在线玩家数 |
/invswap pause |
暂停计时器,但不重置它 |
/invswap resume |
从暂停处继续运行 |
/invswap bypass |
切换你自身的交换豁免状态 |
/invswap lang <en|es> |
在英文和西班牙文之间切换语言 |
/invswap reload |
重新加载配置文件并重启计时器 |
/invswap help |
在游戏中显示指令列表 |
权限
| 节点 |
默认值 |
描述 |
inventoryswap.admin |
OP |
拥有所有命令的完全访问权限 |
inventoryswap.use |
所有人 |
有资格参与交换 |
inventoryswap.bypass |
无人 |
完全免疫交换 |
没有 inventoryswap.use 权限的玩家会被静默排除在轮换之外。
inventoryswap.bypass 是独立的——适合那些希望默认退出轮换的管理员使用。
配置
# config.yml
swap-interval: 300 # 每次轮换之间的间隔(秒)(默认:5 分钟)
min-players: 2 # 在线玩家少于该数量时不会进行轮换
language: en # en | es
当计时器触发时,如果没有足够符合条件的玩家,轮换将被静默跳过,计时器会正常重置。
功能
- 动作栏倒计时:所有在线玩家始终可见
- 暂停 / 恢复:在倒计时中途冻结计时器,从断点处继续
- 完整物品栏互换:包括内容物、护甲槽和副手
- 可配置的最小玩家数:仅在值得进行轮换时才触发
- 每次轮换时的标题 + 副标题公告
- 每次轮换前带有声音提示的 5 秒倒计时标题
- 轮换时的细微粒子与音效效果(传送门 + 末地烛爆炸,无卡顿)
- 每位玩家的绕过开关:适用于管理员或豁免玩家
- 双语支持:内置英文和西班牙文,可通过命令切换
- 无需重启服务器:所有更改实时重载
兼容性
- Paper / Spigot / Bukkit 及更多 1.21.1
- Java 21
- 无依赖项
语言文件
首次运行时,插件文件夹中会生成 en.yml 和 es.yml。每条消息、操作栏文本、标题与副标题均可编辑。修改后执行 /invswap reload 即可生效。
plugins/InventorySwap/
├── config.yml
└── lang/
├── en.yml
└── es.yml
InventorySwap
InventorySwap is a lightweight plugin that randomly rotates inventories between online players on a configurable timer. No databases, no bloat. Just chaos on a schedule.
Works great on SMP servers, events, or any gamemode where you want to keep players on their toes.
How it works
A countdown ticks in the action bar for every player on the server. When it hits zero, inventories rotate — armor, items, offhand included. Players get a title announcement and a sound cue. The timer resets and starts again.
Commands
All commands require the inventoryswap.admin permission.
| Command |
Description |
/invswap interval <seconds> |
Set how often the swap triggers |
/invswap minplayers <n> |
Minimum online players needed to swap |
/invswap pause |
Freeze the timer without resetting it |
/invswap resume |
Resume from where it left off |
/invswap bypass |
Toggle swap immunity for yourself |
/invswap lang <en|es> |
Switch between English and Spanish |
/invswap reload |
Reload config and restart the timer |
/invswap help |
Show command list in-game |
Permissions
| Node |
Default |
Description |
inventoryswap.admin |
OP |
Full access to all commands |
inventoryswap.use |
Everyone |
Eligible to participate in swaps |
inventoryswap.bypass |
Nobody |
Immune to swaps entirely |
Players without inventoryswap.use are silently excluded from the rotation.
inventoryswap.bypass is separate — useful for staff who want to stay opt-out by default.
Configuration
# config.yml
swap-interval: 300 # seconds between each swap (default: 5 minutes)
min-players: 2 # won't swap if fewer players are online
language: en # en | es
If there aren't enough eligible players when the timer fires, the swap is skipped silently and the timer resets normally.
Features
- Action bar countdown visible to all online players at all times
- Pause / Resume — freeze the timer mid-countdown, pick up exactly where you left off
- Full inventory swap — contents, armor slots and offhand
- Configurable minimum players — swap only fires when it's worth it
- Title + subtitle announcement on every swap
- 5-second countdown titles with sound cues before each swap
- Subtle particle and sound effects on swap (Portal + End Rod burst, no lag)
- Per-player bypass toggle for staff or exempt players
- Bilingual — English and Spanish out of the box, switchable with a command
- No restart required — everything reloads live
Compatibility
- Paper / Spigot / Bukkit / and more 1.21.1
- Java 21
- No dependencies
Language files
Both en.yml and es.yml are generated in the plugin folder on first run. Every message, action bar text, title and subtitle is editable. Changes apply on /invswap reload.
plugins/InventorySwap/
├── config.yml
└── lang/
├── en.yml
└── es.yml
评论 0
登录后参与评分
还没有评论,来抢沙发吧