mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-23 00:31:20 +01:00
Merge pull request #213 from 0ft3n/master
Added ignore-sweep-attacks: true/false to summoning extension.
This commit is contained in:
commit
baeb012b72
@ -14,6 +14,7 @@ import org.bukkit.entity.*;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -41,6 +42,11 @@ public abstract class SummoningEnchantment extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getCause() == EntityDamageEvent.DamageCause.ENTITY_SWEEP_ATTACK
|
||||
&& this.getConfig().getBool("config.ignore-sweep-attacks")) {
|
||||
return;
|
||||
}
|
||||
|
||||
doSpawn(attacker, victim, level);
|
||||
}
|
||||
|
||||
|
@ -30,3 +30,4 @@ config:
|
||||
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
||||
health-per-level: 6 # Health for mobs to have per level
|
||||
chance-per-level: 5 # Chance to spawn mobs per level
|
||||
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -31,3 +31,4 @@ config:
|
||||
health-per-level: 4 # Health for mobs to have per level
|
||||
chance-per-level: 5 # Chance to spawn mobs per level
|
||||
allow-not-fully-charged: false # don't require sword attack to be at full charge
|
||||
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -31,3 +31,4 @@ config:
|
||||
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
||||
health-per-level: 4 # Health for mobs to have per level
|
||||
chance-per-level: 5 # Chance to spawn mobs per level
|
||||
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -31,3 +31,4 @@ config:
|
||||
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
||||
health-per-level: 6 # Health for mobs to have per level
|
||||
chance-per-level: 5 # Chance to spawn mobs per level
|
||||
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -30,3 +30,4 @@ config:
|
||||
ticks-to-live-per-level: 40 # Ticks for mob to live per level
|
||||
health-per-level: 4 # Health for mobs to have per level
|
||||
chance-per-level: 5 # Chance to spawn mobs per level
|
||||
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -31,3 +31,4 @@ config:
|
||||
health-per-level: 4 # Health for mobs to have per level
|
||||
chance-per-level: 5 # Chance to spawn mobs per level
|
||||
allow-not-fully-charged: false # don't require sword attack to be at full charge
|
||||
ignore-sweep-attacks: true # Ignore sweep attacks
|
Loading…
Reference in New Issue
Block a user