mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-04 02:31:21 +01:00
Fixed Butchering, Abattoir, and Slaughter working on players (for some reason)
This commit is contained in:
parent
f76590899d
commit
448ccc215d
@ -5,6 +5,7 @@ import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Trident;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -26,6 +27,10 @@ public class Abattoir extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (victim instanceof Player) {
|
||||
return;
|
||||
}
|
||||
|
||||
double damage = event.getDamage();
|
||||
double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier");
|
||||
double bonus = (multiplier * (level + 1)) + 1;
|
||||
|
@ -5,6 +5,7 @@ import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -24,6 +25,10 @@ public class Butchering extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (victim instanceof Player) {
|
||||
return;
|
||||
}
|
||||
|
||||
double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "bonus-per-level");
|
||||
event.setDamage(event.getDamage() + (level * multiplier));
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -26,6 +27,10 @@ public class Slaughter extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (victim instanceof Player) {
|
||||
return;
|
||||
}
|
||||
|
||||
double damage = event.getDamage();
|
||||
double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier");
|
||||
double bonus = (multiplier * (level + 1)) + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user