mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-25 15:35:11 +01:00
Added sniper to Summoning
This commit is contained in:
parent
760afac38c
commit
06ea09dfdc
@ -12,19 +12,15 @@ import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Mob;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.event.entity.EntityDropItemEvent;
|
||||
import org.bukkit.event.entity.EntityTameEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
@ -107,5 +103,6 @@ public abstract class SummoningEnchantment extends EcoEnchant {
|
||||
if(event.getEntity().getMetadata("eco-target").isEmpty()) return;
|
||||
|
||||
event.getDrops().clear();
|
||||
event.setDroppedExp(0);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package com.willfp.ecoenchants.summoning.enchants;
|
||||
|
||||
import com.willfp.ecoenchants.summoning.SummoningEnchantment;
|
||||
import com.willfp.ecoenchants.summoning.SummoningType;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class Sniper extends SummoningEnchantment {
|
||||
public Sniper() {
|
||||
super("sniper", EnchantmentType.NORMAL, SummoningType.TRIDENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityType getEntity() {
|
||||
return EntityType.SKELETON;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
#
|
||||
# Sniper EcoEnchant
|
||||
#
|
||||
|
||||
name: "Sniper"
|
||||
description: Spawns skeletons to attack your target.
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
table: true
|
||||
villager: true
|
||||
loot: true
|
||||
rarity: legendary
|
||||
|
||||
general-config:
|
||||
targets:
|
||||
- trident
|
||||
grindstoneable: true
|
||||
conflicts: []
|
||||
maximum-level: 3
|
||||
|
||||
config:
|
||||
mobs-per-level: 2 # Amount of mobs to spawn 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
|
||||
chance-per-level: 5 # Chance to spawn mobs per level
|
Loading…
Reference in New Issue
Block a user