Fixed changes from reverting

This commit is contained in:
Auxilor
2021-06-23 15:52:56 +01:00
parent 1adec8c753
commit b371261018
2 changed files with 5 additions and 2 deletions

View File

@@ -28,6 +28,9 @@ public class Parasitic extends EcoEnchant {
if (newHealth > attacker.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()) {
newHealth = attacker.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();
}
attacker.setHealth(newHealth);
if (attacker.getHealth() > 0) {
attacker.setHealth(newHealth);
}
}
}

View File

@@ -64,7 +64,7 @@ public class Soulbound extends EcoEnchant {
}
if (this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "on-books")) {
if (itemStack.getItemMeta() instanceof EnchantmentStorageMeta && (((EnchantmentStorageMeta) itemStack.getItemMeta()).getStoredEnchants().containsKey(this.getEnchantment()))) {
if (itemStack.getItemMeta() instanceof EnchantmentStorageMeta && (((EnchantmentStorageMeta) itemStack.getItemMeta()).getStoredEnchants().containsKey(this))) {
soulboundItems.add(itemStack);
}
}