Changed functions EnchantChecks

This commit is contained in:
kireevm96
2021-03-04 16:50:19 +03:00
committed by GitHub
parent e9236f97de
commit ada2cfd015

View File

@@ -44,10 +44,9 @@ public class Soulbound extends EcoEnchant {
if (player.getKiller() instanceof Player) {
Player killer = (Player) player.getKiller();
ItemStack item = killer.getInventory().getItemInMainHand();
if (EnchantChecks.item(item, EcoEnchants.REAPER)) {
if (!(EcoEnchants.REAPER.getDisabledWorlds().contains(player.getWorld()))) {
int points = EnchantChecks.getItemLevel(item, EcoEnchants.REAPER);
if (EnchantChecks.mainhand(killer, EcoEnchants.REAPER)) {
if (!(EcoEnchants.REAPER.getDisabledWorlds().contains(killer.getWorld()))) {
int points = EnchantChecks.getMainhandLevel(killer, EcoEnchants.REAPER);
if (EnchantmentUtils.passedChance(EcoEnchants.REAPER, points)) {
return;
}