ItemCooldowns
适用于 PvP 物品的冷却时间:重锤、长矛、三叉戟、末影水晶和重生锚。
当玩家在其冷却期间尝试使用物品时,该动作将被取消并显示聊天消息。
功能特性
- 重锤 — 攻击间隔为 45 秒的冷却时间
- 长矛(1.21.11+,全部 7 种变体)— 突刺(Jab/Charge)与攻击之间有 5 秒的冷却时间
- 三叉戟 — 投掷、激流冲刺和攻击之间有 5 秒的冷却时间
- 末影水晶 — 每次使用有 45 秒的冷却时间
- 重生锚 — 每次使用有 45 秒的冷却时间
- 末影珍珠风格的视觉冷却效果:物品栏槽位会被一个随时间缩小的半透明白色方块覆盖——对背包中所有同类物品生效
- 当玩家尝试在冷却期间使用物品时显示聊天消息
- 完全可配置:持续时间、取消动作、覆盖层、消息内容
pvp-only:仅在对玩家造成攻击时触发重锤/长矛/三叉戟的冷却(默认开启)
- 世界白名单(默认禁用——在所有世界中生效)
兼容性
- 服务端软件:Paper, Spigot, Bukkit, Purpur, Pufferfish, Leaves 以及任何其他基于 Bukkit 的分叉版本。在 Fabric/Quilt 上通过 Banner/CardBoard 兼容
- Minecraft 版本:1.21 – 26.x(需要 Java 21+)。长矛仅在 1.21.11 及更高版本中存在——在旧版本中该规则会自动禁用
- Folia:插件不使用任何调度器,完全兼容
- LuckPerms:插件权限通过 LuckPerms 进行管理
权限 (LuckPerms)
绕过权限默认不授予任何人,即使是管理员——请手动授予:
| 权限 |
描述 |
itemcooldowns.bypass.mace |
绕过重锤冷却 |
itemcooldowns.bypass.spear |
绕过长矛冷却 |
itemcooldowns.bypass.trident |
绕过三叉戟冷却 |
itemcooldowns.bypass.end-crystal |
绕过末影水晶冷却 |
itemcooldowns.bypass.respawn-anchor |
绕过重生锚冷却 |
itemcooldowns.bypass |
绕过所有冷却(父级权限) |
itemcooldowns.admin |
访问 /itemcooldowns reload(默认:管理员) |
示例:
/lp user Sooqwess permission set itemcooldowns.bypass.mace true
/lp group vip permission set itemcooldowns.bypass true
命令
| 命令 |
描述 |
/itemcooldowns help (别名: /icd) |
帮助 |
/itemcooldowns reload |
重新加载配置文件和本地化文件 |
配置
locale: en # 消息语言:en, ru 或自定义代码
pvp-only: true # 攻击冷却仅针对玩家生效
worlds:
enabled: false # 启用世界白名单
list:
- world
- world_pvp
messages:
enabled: true # 启用聊天消息
notify-start: false # 冷却开始时发送消息
mace:
enabled: true
cooldown-seconds: 45 # 冷却时长
cancel-action: true # 在冷却期间取消动作
overlay: true # 槽位显示白色冷却覆盖层
bypass-permission: itemcooldowns.bypass.mace
spear、trident、end-crystal、respawn-anchor 拥有相同的配置部分。
本地化
plugins/ItemCooldowns/lang/ 文件夹中包含 messages-en.yml 和 messages-ru.yml(首次启动时提取)。若要添加自定义语言,请复制文件并重命名为 messages-<code>.yml,编辑后在配置中设置 locale: <code>。缺失的字符串将回退到内置的英文模板,然后是俄文。
消息中的占位符:{item} — 物品名称,{seconds} — 剩余秒数。
注意事项
- 当玩家离开服务器时,冷却时间会重置
- 水晶/锚点在右键使用(尝试)时开始计算冷却时间
许可证
MIT。作者:Sooqwess。
ItemCooldowns
Cooldowns for PvP items: mace, spear, trident, end crystals and respawn anchors.
When a player tries to use an item during its cooldown, the action is cancelled and a chat message is shown.
Features
- Mace — 45 second cooldown between attacks
- Spear (1.21.11+, all 7 variants) — 5 second cooldown between lunges (Jab/Charge) and attacks
- Trident — 5 second cooldown between throws, Riptide dashes and attacks
- End Crystal — 45 second cooldown per use
- Respawn Anchor — 45 second cooldown per use
- Ender pearl style visual cooldown: the inventory slot is covered by a translucent white square that shrinks over time — works on every item of that type in the inventory
- Chat message when a player tries to use an item during its cooldown
- Fully configurable: duration, action cancel, overlay, messages
pvp-only: mace/spear/trident attacks only trigger cooldowns against players (default)
- World whitelist (disabled by default — works everywhere)
Compatibility
- Server software: Paper, Spigot, Bukkit, Purpur, Pufferfish, Leaves and any other Bukkit fork. On Fabric/Quilt it works through Banner/CardBoard
- Minecraft versions: 1.21 – 26.x (Java 21+). The spear only exists since 1.21.11 — on older versions that rule automatically disables itself
- Folia: the plugin uses no schedulers, fully compatible
- LuckPerms: plugin permissions are managed through LuckPerms
Permissions (LuckPerms)
Bypass permissions are not granted by default to anyone, even operators — grant them manually:
| Permission |
Description |
itemcooldowns.bypass.mace |
Bypass mace cooldown |
itemcooldowns.bypass.spear |
Bypass spear cooldown |
itemcooldowns.bypass.trident |
Bypass trident cooldown |
itemcooldowns.bypass.end-crystal |
Bypass end crystal cooldown |
itemcooldowns.bypass.respawn-anchor |
Bypass respawn anchor cooldown |
itemcooldowns.bypass |
Bypass all cooldowns (parent permission) |
itemcooldowns.admin |
Access to /itemcooldowns reload (default: operators) |
Example:
/lp user Sooqwess permission set itemcooldowns.bypass.mace true
/lp group vip permission set itemcooldowns.bypass true
Commands
| Command |
Description |
/itemcooldowns help (alias: /icd) |
Help |
/itemcooldowns reload |
Reload config and locale files |
Configuration
locale: en # message language: en, ru or your own
pvp-only: true # attack cooldowns only against players
worlds:
enabled: false # enable world whitelist
list:
- world
- world_pvp
messages:
enabled: true # chat messages
notify-start: false # message when a cooldown starts
mace:
enabled: true
cooldown-seconds: 45 # cooldown length
cancel-action: true # cancel the action during cooldown
overlay: true # white cooldown overlay on the slot
bypass-permission: itemcooldowns.bypass.mace
Identical sections exist for spear, trident, end-crystal, respawn-anchor.
Localization
The plugins/ItemCooldowns/lang/ folder contains messages-en.yml and messages-ru.yml (both are extracted on first start). To add your own language, copy a file as messages-<code>.yml, edit it and set locale: <code> in the config. Missing strings fall back to the bundled English template, then to Russian.
Placeholders in messages: {item} — item name, {seconds} — remaining seconds.
Notes
- Cooldowns reset when a player leaves the server
- Crystals/anchors start the cooldown on right-click use (attempt)
License
MIT. Author: Sooqwess.
评论 0
登录后参与评分
还没有评论,来抢沙发吧