Added incendiary option to firewant

This commit is contained in:
Auxilor 2020-11-20 18:23:52 +00:00
parent ac1dc62a7a
commit 9dfcdbba17
2 changed files with 2 additions and 1 deletions

View File

@ -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));

View File

@ -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