CustomTNT 是一款 Minecraft 插件,添加了完全可自定义的 TNT 类型,具备独特的爆炸效果、方块交互和机制。非常适合希望用动态爆炸工具增强游戏体验的服务器。
功能
- 创建具有可配置名称、威力、火焰效果和方块替换功能的 自定义 TNT 变体。
- 独特的 TNT 类型包括:
- 流体清洁 TNT – 清除半径 10 格内的水和岩浆。
- 霜冻 TNT – 冻结水并在半径 5 格内生成冰。
- 小型 TNT – 小范围爆炸,适合在建筑附近使用。
- 中型 TNT – 中等范围爆炸,会点燃方块。
- 巨型 TNT – 大范围毁灭性爆炸。
命令
/customtnt get <key>
根据键值向玩家发放自定义 TNT 物品。
示例
/customtnt get liquidcleaner – 获取流体清洁 TNT。
/customtnt get frost – 获取霜冻 TNT。
权限
customtnt.admin – 用于执行 /customtnt 命令所需权限。
配置
所有 TNT 类型均可在插件的 config.yml 中进行配置。
每个 TNT 条目支持以下设置:
name – 自定义显示名称(支持渐变色)。
power – 爆炸威力(半径约为 power / 2)。
setfire – TNT 是否会点燃附近的方块。
breakblocks – TNT 是否会破坏方块。
replaceblocks – 配置方块替换逻辑(例如将水/岩浆变为空气或冰)。
description – 物品上显示的描述文本。
面向开发者
该插件提供了一个简单的 API,允许开发者接入自定义 TNT 爆炸事件。
你可以监听 CustomTntExploadEvent 以检测自定义 TNT 类型的爆炸并修改其行为。
方法:
CustomTnt getCustomTnt() – 返回代表正在爆炸的 TNT 的 CustomTnt 对象(包含其键值、威力和配置信息)。
EntityExplodeEvent getEvent() – 返回原始的 Bukkit EntityExplodeEvent,允许你取消或修改爆炸行为。
CustomTNT is a Minecraft plugin that adds fully customizable TNT types with unique explosion effects, block interactions, and mechanics. Perfect for servers looking to enhance gameplay with dynamic explosive tools.
Features
- Create custom TNT variants with configurable names, power, fire effects, and block replacement.
- Unique TNT types such as:
- Fluid Cleaner TNT – Removes water and lava within a 10-block radius.
- Frost TNT – Freezes water and creates ice in a 5-block radius.
- Mini TNT – Small explosion, safe for building.
- Medium TNT – Moderate explosion, ignites blocks.
- Mega TNT – Massive explosion with wide destruction.
Commands
/customtnt get <key>
Gives a player a custom TNT item by its key.
Examples
/customtnt get liquidcleaner – Receive Fluid Cleaner TNT.
/customtnt get frost – Receive Frost TNT.
Permissions
customtnt.admin – Required to use /customtnt commands.
Configuration
All TNT types can be configured in the plugin’s config.yml.
Each TNT entry supports:
name – Custom display name (supports gradients).
power – Explosion power (radius is roughly power / 2).
setfire – Whether the TNT ignites nearby blocks.
breakblocks – Whether the TNT breaks blocks.
replaceblocks – Configure block replacement (e.g., turn water/lava into air or ice).
description – Lore text shown on the item.
For developers
Plugin provides a simple API that allows developers to hook into custom TNT explosions.
You can listen to the CustomTntExploadEvent to detect when a custom TNT type explodes and modify its behavior.
Methods:
CustomTnt getCustomTnt() – Returns the CustomTnt object representing the exploding TNT (contains its key, power, and configuration).
EntityExplodeEvent getEvent() – Returns the original Bukkit EntityExplodeEvent, allowing you to cancel or modify the explosion.
评论 0
登录后参与评分
还没有评论,来抢沙发吧