mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-26 20:27:38 +01:00
Added incendiary option to firewant
This commit is contained in:
parent
ac1dc62a7a
commit
9dfcdbba17
@ -22,7 +22,7 @@ public class Firewand extends Spell {
|
||||
@Override
|
||||
public void onUse(Player player, int level, PlayerInteractEvent event) {
|
||||
Fireball fireball = player.launchProjectile(Fireball.class, player.getEyeLocation().getDirection().multiply(this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "velocity")));
|
||||
fireball.setIsIncendiary(false);
|
||||
fireball.setIsIncendiary(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "fire"));
|
||||
fireball.setMetadata("eco-damage", new FixedMetadataValue(EcoEnchantsPlugin.getInstance(), this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "damage-per-level") * level));
|
||||
if(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "no-explode")) {
|
||||
fireball.setMetadata("nobreak", new FixedMetadataValue(EcoEnchantsPlugin.getInstance(), true));
|
||||
|
@ -23,5 +23,6 @@ config:
|
||||
activation-sound: ENTITY_GHAST_SHOOT
|
||||
cooldown: 60 # In seconds
|
||||
velocity: 3
|
||||
fire: true
|
||||
damage-per-level: 8
|
||||
no-explode: false # Don't explode
|
Loading…
Reference in New Issue
Block a user