ToolGuardian 图标

ToolGuardian

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/toolguardian
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10

平台: paper purpur

标签: equipment

资源介绍

ToolGuardian

Warn players when their tools or armor are about to break — configurable thresholds, localized messages, MiniMessage formatting, and per-player toggles with persistence.

Features

  • Monitor active equipment: main hand, off hand, helmet, chestplate, leggings, boots (toggle per slot).
  • Configurable thresholds in percent (add as many as you like, each with its own message key and optional sound).
  • Localized messages (lang/de.yml, lang/en.yml) using MiniMessage formatting.
  • Placeholder support in messages: {item}, {percent}, {remaining}, {max}.
  • Anti-spam: warn once per threshold per item until the next threshold is reached.
  • Gamemode filter: by default only Survival/Adventure.
  • Per-player toggle command with persistent storage (toggles.yml).

Requirements

  • Paper (Minecraft 1.21.10)
  • Java 21

Installation

  1. Download the release JAR (or build from source, see below).
  2. Put the JAR into your server's plugins folder.
  3. Start or restart the server.
  4. Optional: adjust plugins/ToolGuardian/config.yml and localization files under plugins/ToolGuardian/lang/.

Configuration

Default config.yml (you can add or remove thresholds freely):

language: de

enabled-gamemodes:
  - SURVIVAL
  - ADVENTURE

monitor:
  main-hand: true
  off-hand: true
  head: true
  chest: true
  legs: true
  feet: true

thresholds:
  - percent: 20
    message: warn.medium
  - percent: 10
    message: warn.low
  - percent: 5
    message: warn.critical
    sound: BLOCK_NOTE_BLOCK_BELL
    sound-volume: 1.0
    sound-pitch: 1.0

check-interval-ticks: 20

Notes:

  • Thresholds should be listed in ascending order by percent.
  • A sound plays only if configured on that threshold.
  • The plugin checks at a fixed interval (20 ticks = 1s by default).

Localization

Two language files are provided: lang/de.yml and lang/en.yml. Example:

warn:
  medium: "<yellow><bold>Heads up:</bold></yellow> {item} at <yellow>{percent}%</yellow> durability (<gray>{remaining}/{max}</gray>)."
  low: "<gold><bold>Warning:</bold></gold> {item} at <gold>{percent}%</gold> durability (<gray>{remaining}/{max}</gray>)."
  critical: "<red><bold>CRITICAL:</bold></red> {item} only <red>{percent}%</red> durability left (<gray>{remaining}/{max}</gray>)!"
toggle:
  now-enabled: "<green>ToolGuardian warnings: <bold>ON</bold></green>"
  now-disabled: "<red>ToolGuardian warnings: <bold>OFF</bold></red>"
  usage: "<gray>Usage:</gray> <yellow>/toolguardian toggle</yellow>"
  no-permission: "<red>You don't have permission.</red>"

Placeholders are written as {item}, {percent}, {remaining}, {max} and can be styled with MiniMessage tags around them. The plugin converts these placeholders and resolves them at runtime.

Commands

  • /toolguardian toggle (alias /tg): Toggle warnings for yourself.

Permissions

  • toolguardian.toggle — default: true

How it works

  • The plugin periodically scans configured slots. If an item has durability and enters a configured threshold (e.g., 20% → 10% → 5%), the player receives exactly one message per threshold step for that item. When the item changes or durability goes above the highest threshold again, the internal state resets, allowing future warnings as appropriate.

Troubleshooting

  • No messages?
    • Ensure your gamemode is enabled in enabled-gamemodes.
    • Check that the slot (e.g., main-hand, head) is enabled under monitor.
    • Verify the item actually has durability.
  • Placeholders appear literally?
    • Make sure you kept the curly-brace placeholders ({item}, {percent}, {remaining}, {max}) in your locale file.
    • Avoid conflicting chat formatters that strip MiniMessage formatting.
  • No sound at critical?
    • Ensure the sound field exists on the desired threshold and uses a valid Bukkit sound name.
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Blockfront - spawn vehicles in dedicated server

价格:0 墨喵币
下载量:0

查看详情
Structures Plus

价格:0 墨喵币
下载量:0

查看详情
Untitled Duck Add-on

价格:0 墨喵币
下载量:0

查看详情
VillpickupV

价格:0 墨喵币
下载量:0

查看详情