Added sniper to Summoning

This commit is contained in:
Auxilor 2020-11-22 16:06:05 +00:00
parent 760afac38c
commit 06ea09dfdc
3 changed files with 43 additions and 4 deletions

View File

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

View File

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

View File

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