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.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.event.entity.EntityTargetEvent;
|
import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -41,6 +42,11 @@ public abstract class SummoningEnchantment extends EcoEnchant {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.getCause() == EntityDamageEvent.DamageCause.ENTITY_SWEEP_ATTACK
|
||||||
|
&& this.getConfig().getBool("config.ignore-sweep-attacks")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
doSpawn(attacker, victim, level);
|
doSpawn(attacker, victim, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,4 +29,5 @@ config:
|
|||||||
mobs-per-level: 2 # Amount of mobs to spawn per level
|
mobs-per-level: 2 # Amount of mobs to spawn per level
|
||||||
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
||||||
health-per-level: 6 # Health for mobs to have per level
|
health-per-level: 6 # Health for mobs to have per level
|
||||||
chance-per-level: 5 # Chance to spawn mobs per level
|
chance-per-level: 5 # Chance to spawn mobs per level
|
||||||
|
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -30,4 +30,5 @@ config:
|
|||||||
ticks-to-live-per-level: 50 # Ticks for mob to live per level
|
ticks-to-live-per-level: 50 # Ticks for mob to live per level
|
||||||
health-per-level: 4 # Health for mobs to have per level
|
health-per-level: 4 # Health for mobs to have per level
|
||||||
chance-per-level: 5 # Chance to spawn mobs 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
|
allow-not-fully-charged: false # don't require sword attack to be at full charge
|
||||||
|
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -30,4 +30,5 @@ config:
|
|||||||
mobs-per-level: 1 # Amount of mobs to spawn per level
|
mobs-per-level: 1 # Amount of mobs to spawn per level
|
||||||
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
||||||
health-per-level: 4 # Health for mobs to have per level
|
health-per-level: 4 # Health for mobs to have per level
|
||||||
chance-per-level: 5 # Chance to spawn mobs per level
|
chance-per-level: 5 # Chance to spawn mobs per level
|
||||||
|
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -30,4 +30,5 @@ config:
|
|||||||
mobs-per-level: 1 # Amount of mobs to spawn per level
|
mobs-per-level: 1 # Amount of mobs to spawn per level
|
||||||
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
ticks-to-live-per-level: 30 # Ticks for mob to live per level
|
||||||
health-per-level: 6 # Health for mobs to have per level
|
health-per-level: 6 # Health for mobs to have per level
|
||||||
chance-per-level: 5 # Chance to spawn mobs per level
|
chance-per-level: 5 # Chance to spawn mobs per level
|
||||||
|
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -29,4 +29,5 @@ config:
|
|||||||
mobs-per-level: 2 # Amount of mobs to spawn per level
|
mobs-per-level: 2 # Amount of mobs to spawn per level
|
||||||
ticks-to-live-per-level: 40 # Ticks for mob to live per level
|
ticks-to-live-per-level: 40 # Ticks for mob to live per level
|
||||||
health-per-level: 4 # Health for mobs to have per level
|
health-per-level: 4 # Health for mobs to have per level
|
||||||
chance-per-level: 5 # Chance to spawn mobs per level
|
chance-per-level: 5 # Chance to spawn mobs per level
|
||||||
|
ignore-sweep-attacks: true # Ignore sweep attacks
|
@ -30,4 +30,5 @@ config:
|
|||||||
ticks-to-live-per-level: 20 # Ticks for mob to live per level
|
ticks-to-live-per-level: 20 # Ticks for mob to live per level
|
||||||
health-per-level: 4 # Health for mobs to have per level
|
health-per-level: 4 # Health for mobs to have per level
|
||||||
chance-per-level: 5 # Chance to spawn mobs 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
|
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