可发射的火球
描述
Shootable Fireballs 插件允许玩家使用 Fire Charges(火球药)发射火球。火球的速度、爆炸半径、强度和伤害均可自定义。此外,该插件支持寿命功能,即如果火球在指定时间内未击中任何目标,它们将自动爆炸,从而防止其在世界中滞留并导致卡顿。
玩家也可以通过 config.yml 文件或游戏内命令直接配置火球的行为。
特性
- 发射火球:手持火球药右键点击即可发射火球。
- 命中爆炸:火球击中实体或方块时会爆炸。
- 可配置的寿命:设置火球的寿命,避免因火球滞留而导致的性能问题。
- 可配置的伤害:调整火球爆炸对实体造成的伤害。
- 破坏方块:配置火球爆炸时是否可以破坏方块。
- 速度与强度自定义:控制火球的速度及其爆炸的强度。
配置
该插件允许通过 config.yml 文件进行自定义。此文件应放置在插件的主目录中。
config.yml
fireball:
# 火球速度(1.0 为正常速度)
speed: 1.0
# 爆炸半径(受影响的方块数)
explosion_radius: 3
# 爆炸强度(数值越高 = 爆炸越大)
explosion_strength: 4
# 火球是否可以破坏方块(true/false)
can_break_blocks: true
# 火球爆炸对实体造成的伤害(0 = 无伤害)
damage: 10
# 每次射击之间的冷却时间(秒)(此处未实现)
cooldown: 0.5
# 火球在未击中任何目标前的寿命(秒),超时后会自动爆炸
lifespan: 30
配置选项
-
speed:控制火球移动的速度。默认值为 1.0(正常速度)。
-
explosion_radius:爆炸影响的半径(以方块为单位)。默认值为 3 个方块。
-
explosion_strength:决定爆炸的强度。数值越高,爆炸越强。默认值为 4。
-
can_break_blocks:如果设置为 true,火球爆炸将破坏方块。设置为 false 以防止方块被破坏。默认为 true。
-
damage:火球爆炸对爆炸半径内的实体(玩家、生物等)造成的伤害量。设置为 0 则无伤害。默认为 10。
-
cooldown:指定连续发射火球之间的冷却时间(秒)。在当前版本的插件中未实现,但可在未来版本中添加。默认值为 0.5 秒。
-
lifespan:火球的寿命(秒)。如果在此时间内火球未击中任何目标,它将自动爆炸。默认设置为 30 秒。
游戏内命令
您可以使用 /fireballconfig 命令在游戏中直接调整插件的设置。
命令语法
/fireballconfig <setting> <value>
<setting>:您要调整的设置(例如 speed、radius、damage、lifespan 等)。
<value>:设置的新值(例如用于 speed、damage 等的数字,或用于 can_break_blocks 等布尔设置的 true/false)。
示例命令
/fireballconfig speed 2.0 - 将火球速度设置为 2.0。
/fireballconfig radius 5 - 将爆炸半径设置为 5 个方块。
/fireballconfig damage 20 - 将爆炸伤害设置为 20。
/fireballconfig lifespan 60 - 将火球寿命设置为 60 秒。
使用方法
-
发射火球:要发射火球,只需在手中持有 Fire Charge(火球药)并右键点击。
-
命中爆炸:火球撞击任何方块或实体时都会爆炸。爆炸行为可通过 config.yml 文件进行自定义(例如爆炸半径、强度、破坏方块和伤害)。
-
超时后自动爆炸:如果火球在配置的 lifespan(默认为 30 秒)内未击中任何目标,它将自动爆炸,以防止其在世界中滞留。
用例示例
- 玩家向生物发射一枚火球,火球在命中时爆炸,对生物造成伤害。
- 如果玩家将火球射向空中且未击中任何目标,它将在 30 秒后(或根据配置的寿命时间)自动爆炸。
- 如果配置允许,爆炸可以破坏方块,并对附近的所有实体(生物或玩家)造成伤害。
安装
- 下载 Shootable Fireballs 插件
.jar 文件。
- 将
.jar 文件放入服务器的 plugins 文件夹中。
- 重启服务器以启用插件。
- 通过编辑位于插件文件夹中的
config.yml 文件来自定义插件设置。
- 如有需要,使用
/fireballconfig 命令在游戏内调整设置。
Shootable Fireballs
Description
The Shootable Fireballs plugin allows players to shoot fireballs using Fire Charges. The fireballs can be customized in terms of speed, explosion radius, strength, and damage. Additionally, the plugin supports a lifespan feature, meaning fireballs will automatically explode if they don't hit anything after a specified period of time, preventing them from lingering in the world and causing lag.
Players can also configure the behavior of the fireballs directly through the config.yml file or via in-game commands.
Features
- Shoot Fireballs: Right-click with a fire charge to shoot a fireball.
- Explosion on Impact: Fireballs explode when they hit an entity or block.
- Configurable Lifespan: Set the lifespan of fireballs to avoid performance issues due to lingering fireballs.
- Configurable Damage: Adjust the damage done by fireball explosions to entities.
- Block Breaking: Configure whether fireballs can break blocks on explosion.
- Speed and Strength Customization: Control the speed of fireballs and the strength of their explosions.
Configuration
The plugin allows customization via the config.yml file. This file should be placed in the plugin’s main directory.
config.yml
fireball:
# Speed of the fireball (1.0 is normal speed)
speed: 1.0
# Explosion radius (blocks affected)
explosion_radius: 3
# Explosion strength (higher = bigger explosion)
explosion_strength: 4
# Whether fireballs can break blocks (true/false)
can_break_blocks: true
# Damage dealt by the fireball explosion to entities (0 = no damage)
damage: 10
# Cooldown in seconds between shots (not implemented here)
cooldown: 0.5
# Lifespan of fireballs in seconds before they explode if they haven't hit anything
lifespan: 30
Configuration Options
-
speed: Controls how fast the fireball moves. Default value is 1.0 (normal speed).
-
explosion_radius: The radius (in blocks) affected by the explosion. Default value is 3 blocks.
-
explosion_strength: Determines the strength of the explosion. The higher the value, the stronger the explosion. Default value is 4.
-
can_break_blocks: If set to true, the fireball explosion will break blocks. Set to false to prevent block destruction. Default is true.
-
damage: The amount of damage the fireball explosion deals to entities (players, mobs, etc.) within the explosion radius. Set to 0 for no damage. Default is 10.
-
cooldown: Specifies the cooldown time (in seconds) between consecutive fireball shots. Not implemented in the current version of the plugin but can be added in future versions. Default value is 0.5 seconds.
-
lifespan: The lifespan (in seconds) of the fireball. If the fireball does not hit anything within this time, it will explode automatically. Set to 30 seconds by default.
In-Game Commands
You can use the /fireballconfig command to adjust the plugin's settings directly in the game.
Command Syntax
/fireballconfig <setting> <value>
<setting>: The setting you want to adjust (e.g., speed, radius, damage, lifespan, etc.).
<value>: The new value for the setting (e.g., a number for speed, damage, etc., or true/false for boolean settings like can_break_blocks).
Example Commands
/fireballconfig speed 2.0 - Sets the fireball speed to 2.0.
/fireballconfig radius 5 - Sets the explosion radius to 5 blocks.
/fireballconfig damage 20 - Sets the explosion damage to 20.
/fireballconfig lifespan 60 - Sets the fireball lifespan to 60 seconds.
Usage
-
Shoot Fireballs: To shoot a fireball, simply right-click with a Fire Charge in your hand.
-
Explosion on Impact: The fireball will explode on impact with any block or entity. The explosion behavior is customizable via the config.yml file (e.g., explosion radius, strength, block breaking, and damage).
-
Automatic Explosion After Timeout: If a fireball does not hit anything within the configured lifespan (default is 30 seconds), it will explode automatically to prevent it from lingering in the world.
Example Use Case
- A player shoots a fireball at a mob, and it explodes on impact, causing damage to the mob.
- If the player shoots the fireball into the air and it doesn’t hit anything, it will automatically explode after 30 seconds (or whatever lifespan is configured).
- The explosion can break blocks if configured to do so, and it will deal damage to any nearby entities (mobs or players).
Installation
- Download the Shootable Fireballs plugin
.jar file.
- Place the
.jar file in the plugins folder of your server.
- Restart the server to enable the plugin.
- Customize the plugin settings by editing the
config.yml file (located in the plugin's folder).
- Use the
/fireballconfig command to adjust settings in-game if needed.
评论 0
登录后参与评分
还没有评论,来抢沙发吧