mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-27 20:37:34 +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
|
@Override
|
||||||
public void onUse(Player player, int level, PlayerInteractEvent event) {
|
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 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));
|
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")) {
|
if(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "no-explode")) {
|
||||||
fireball.setMetadata("nobreak", new FixedMetadataValue(EcoEnchantsPlugin.getInstance(), true));
|
fireball.setMetadata("nobreak", new FixedMetadataValue(EcoEnchantsPlugin.getInstance(), true));
|
||||||
|
@ -23,5 +23,6 @@ config:
|
|||||||
activation-sound: ENTITY_GHAST_SHOOT
|
activation-sound: ENTITY_GHAST_SHOOT
|
||||||
cooldown: 60 # In seconds
|
cooldown: 60 # In seconds
|
||||||
velocity: 3
|
velocity: 3
|
||||||
|
fire: true
|
||||||
damage-per-level: 8
|
damage-per-level: 8
|
||||||
no-explode: false # Don't explode
|
no-explode: false # Don't explode
|
Loading…
Reference in New Issue
Block a user