概览
一款轻量级插件,允许玩家通过左键投掷 TNT。
完全可配置:威力、引信时间、爆炸半径、伤害、方块破坏、热重载以及自定义标识以避免与原版 TNT 混淆。
零依赖,专为 Spigot/Paper 1.17 及以上版本设计
主要特性
-
左键投掷 TNT(可配置威力和引信时间)
-
自定义爆炸半径和最大伤害,并随距离衰减
-
可按爆炸切换是否破坏方块
-
在物品描述中添加可选的自定义 ID 以区分“我们的 TNT”和原版 TNT(默认开启)
-
/throwabletnt reload 命令用于重载配置和消息文件
-
支持多语言,通过 messages_(language).yml 实现
-
零依赖,体积小,基于事件驱动,无调度器任务
命令与权限
- /throwabletnt reload - 重载配置和消息文件 (权限: throwabletnt.reload)
- /throwabletnt give <player> <amount> - 给予玩家可投掷 TNT (权限: throwabletnt.give)
配置预览:
# 编写以下代码后,插件将加载 plugins/ThrowableTNT/messages_<code>.yml
# 如果该文件不存在,则回退到 messages_default.yml
language: default
throw:
# 投掷力量倍数(发射速度)
launch-speed: 1.2
# 爆炸前的引信秒数(整数)
fuse-seconds: 3
explosion:
# 爆炸半径:影响冲击波覆盖范围和伤害衰减距离
range: 4.0
# 爆炸中心的最大伤害;随距离线性递减至 'range' 处的 0
max-damage: 18.0
# 允许破坏方块 (false = 仅造成伤害,不破坏地形)
allow-block-break: false
item:
# 是否在物品的描述中使用“自定义标识标签”。
# true: 只有“我们的 TNT”(带有 custom-id 描述的)才能通过左键投掷。
# false: 任何 TNT(包括原版 TNT)都可以通过左键投掷。
use-custom-id: true
# 写入物品描述的自定义标识行(支持 & 颜色代码)
custom-id: "&8ID: THROW-TNT"
# 仅用于 /give 命令的视觉效果(服务器所有者可根据需要重命名和修改描述)
name: "&cThrowable TNT"
lore: "&7左键投掷,几秒后爆炸"
# 禁止玩家将“我们的 TNT”右键放置在地面上
# 仅在 use-custom-id=true 时生效;当标识关闭时不生效,以免干扰原版游戏体验。
cancel-right-click-place: true
如何添加自定义语言
复制 messages_default.yml → messages_your-language.yml
翻译其中的消息内容
在 config.yml 中设置 language: your_CODE
执行 /throwabletnt reload
Overview
A tiny lightweight plugin that lets players throw TNT with a left-click.
Fully configurable: power, fuse-time, explode-radius, damage, block breaking, hot-reload, and custom identification to avoid mixing with vanilla TNT.
Zero dependencies, designed for Spigot/Paper 1.17 and up
Key Features
-
Left-click to throw TNT (configurable power & fuse)
-
Custom radius & max damage with distance falloff
-
Toggle block breaking per explosion
-
Optional custom ID in lore to distinguish “our TNT” from vanilla (ON by default)
-
/throwabletnt reload to reload configs & messages
-
Multi-language via messages_(language).yml
-
Zero dependencies, small footprint, event-driven, no schedulers
Commands & Permissions
- /throwabletnt reload - Reload config & messages (permission: throwabletnt.reload)
- /throwabletnt give <player> <amount> - Give throwable TNT (permission: throwabletnt.give)
Config Preview:
# After writing the code below, the plugin will load plugins/ThrowableTNT/messages_<code>.yml
# If the file doesn't exist, it falls back to messages_default.yml
language: default
throw:
# Throw power multiplier (launch speed)
launch-speed: 1.2
# Fuse seconds (integer) before explosion
fuse-seconds: 3
explosion:
# Explosion radius: affects shockwave coverage and damage falloff distance
range: 4.0
# Max damage at the explosion center; linearly decreases to 0 by 'range'
max-damage: 18.0
# Allow breaking blocks (false = damage only, no terrain damage)
allow-block-break: false
item:
# Whether to use a "custom identification tag" in the item's lore.
# true: Only "our TNT" (with the custom-id lore) can be thrown with left-click.
# false: Any TNT (including vanilla TNT) can be thrown with left-click.
use-custom-id: true
# The custom identification line written to the item's lore (supports & color codes)
custom-id: "&8ID: THROW-TNT"
# Visuals used only for the /give command (Server owner can rename and change description as needed)
name: "&cThrowable TNT"
lore: "&7Left-click to throw, explodes after a few seconds"
# Cancel players from right-clicking to place "our TNT" on the ground
# Only takes effect when use-custom-id=true; does not take effect when identification is off to avoid interfering with vanilla gameplay.
cancel-right-click-place: true
How to Add Your Own Language
Copy messages_default.yml → messages_your-language.yml
Translate the messages
Set language: your_CODE in config.yml
/throwabletnt reload
评论 0
登录后参与评分
还没有评论,来抢沙发吧