diff --git a/Core/pom.xml b/Core/pom.xml
index 611fd6a..51460af 100644
--- a/Core/pom.xml
+++ b/Core/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.5.9
+ 3.6.0
4.0.0
@@ -76,32 +76,32 @@
su.nightexpress.excellentenchants
NMS
- 3.5.9
+ 3.6.0
su.nightexpress.excellentenchants
V1_17_R1
- 3.5.9
+ 3.6.0
su.nightexpress.excellentenchants
V1_18_R2
- 3.5.9
+ 3.6.0
su.nightexpress.excellentenchants
V1_19_R3
- 3.5.9
+ 3.6.0
su.nightexpress.excellentenchants
V1_20_R1
- 3.5.9
+ 3.6.0
su.nightexpress.excellentenchants
V1_20_R2
- 3.5.9
+ 3.6.0
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/api/enchantment/type/DeathEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/api/enchantment/type/DeathEnchant.java
index e42468e..98f2371 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/api/enchantment/type/DeathEnchant.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/api/enchantment/type/DeathEnchant.java
@@ -12,7 +12,7 @@ public interface DeathEnchant extends IEnchantment {
boolean onDeath(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, ItemStack item, int level);
- boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level);
+ boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level);
@NotNull
default EventPriority getDeathPriority() {
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/armor/KamikadzeEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/armor/KamikadzeEnchant.java
index 7bc9bbe..0f3b6bf 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/armor/KamikadzeEnchant.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/armor/KamikadzeEnchant.java
@@ -77,7 +77,7 @@ public class KamikadzeEnchant extends ExcellentEnchant implements Chanced, Death
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
return false;
}
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/DarknessArrowsEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/DarknessArrowsEnchant.java
index d2cc8d1..8297c01 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/DarknessArrowsEnchant.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/DarknessArrowsEnchant.java
@@ -37,7 +37,7 @@ public class DarknessArrowsEnchant extends ExcellentEnchant implements Chanced,
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an arrow with " + Placeholders.ENCHANTMENT_POTION_TYPE + " " + Placeholders.ENCHANTMENT_POTION_LEVEL + " (" + Placeholders.ENCHANTMENT_POTION_DURATION + "s.)");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.1);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantConfusingArrows.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantConfusingArrows.java
index d830c10..b092515 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantConfusingArrows.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantConfusingArrows.java
@@ -37,7 +37,7 @@ public class EnchantConfusingArrows extends ExcellentEnchant implements Chanced,
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an arrow with " + Placeholders.ENCHANTMENT_POTION_TYPE + " " + Placeholders.ENCHANTMENT_POTION_LEVEL + " (" + Placeholders.ENCHANTMENT_POTION_DURATION + "s.)");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.1);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantDragonfireArrows.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantDragonfireArrows.java
index 15bfd31..d9e3960 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantDragonfireArrows.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantDragonfireArrows.java
@@ -50,7 +50,7 @@ public class EnchantDragonfireArrows extends ExcellentEnchant implements Chanced
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an dragonfire arrow (R=" + PLACEHOLDER_FIRE_RADIUS + ", " + PLACEHOLDER_FIRE_DURATION + "s).");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.7);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantElectrifiedArrows.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantElectrifiedArrows.java
index d86aab8..feb7a30 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantElectrifiedArrows.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantElectrifiedArrows.java
@@ -41,7 +41,7 @@ public class EnchantElectrifiedArrows extends ExcellentEnchant implements Chance
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an electrified arrow.");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.3);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantEnderBow.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantEnderBow.java
index de01b2f..cd0520e 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantEnderBow.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantEnderBow.java
@@ -33,7 +33,7 @@ public class EnchantEnderBow extends ExcellentEnchant implements BowEnchant, Cha
EnchantBomber.ID, EnchantGhast.ID,
EnchantExplosiveArrows.ID, EnchantPoisonedArrows.ID, EnchantConfusingArrows.ID,
EnchantWitheredArrows.ID, EnchantElectrifiedArrows.ID, EnchantDragonfireArrows.ID,
- DarknessArrowsEnchant.ID,
+ DarknessArrowsEnchant.ID, VampiricArrowsEnchant.ID,
EnchantHover.ID, FlareEnchant.ID,
Enchantment.ARROW_FIRE.getKey().getKey(),
Enchantment.ARROW_KNOCKBACK.getKey().getKey(),
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantExplosiveArrows.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantExplosiveArrows.java
index 8cedd07..7cf8c1a 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantExplosiveArrows.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantExplosiveArrows.java
@@ -45,7 +45,7 @@ public class EnchantExplosiveArrows extends ExcellentEnchant implements Chanced,
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an explosive arrow.");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.7);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantGhast.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantGhast.java
index 9d54165..c81e114 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantGhast.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantGhast.java
@@ -40,7 +40,7 @@ public class EnchantGhast extends ExcellentEnchant implements BowEnchant, Chance
EnchantEnderBow.ID, EnchantBomber.ID,
EnchantExplosiveArrows.ID, EnchantPoisonedArrows.ID, EnchantConfusingArrows.ID,
EnchantWitheredArrows.ID, EnchantElectrifiedArrows.ID, EnchantDragonfireArrows.ID,
- DarknessArrowsEnchant.ID,
+ DarknessArrowsEnchant.ID, VampiricArrowsEnchant.ID,
EnchantHover.ID, FlareEnchant.ID,
Enchantment.ARROW_FIRE.getKey().getKey(),
Enchantment.ARROW_KNOCKBACK.getKey().getKey(),
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantHover.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantHover.java
index 440fda4..e8acb10 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantHover.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantHover.java
@@ -37,7 +37,7 @@ public class EnchantHover extends ExcellentEnchant implements Chanced, Arrowed,
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an arrow with " + Placeholders.ENCHANTMENT_POTION_TYPE + " " + Placeholders.ENCHANTMENT_POTION_LEVEL + " (" + Placeholders.ENCHANTMENT_POTION_DURATION + "s.)");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.1);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantPoisonedArrows.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantPoisonedArrows.java
index e56fd82..7e5aa90 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantPoisonedArrows.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantPoisonedArrows.java
@@ -37,7 +37,7 @@ public class EnchantPoisonedArrows extends ExcellentEnchant implements Chanced,
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an arrow with " + Placeholders.ENCHANTMENT_POTION_TYPE + " " + Placeholders.ENCHANTMENT_POTION_LEVEL + " (" + Placeholders.ENCHANTMENT_POTION_DURATION + "s.)");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.1);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantWitheredArrows.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantWitheredArrows.java
index 6f22ad3..260cbf1 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantWitheredArrows.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/EnchantWitheredArrows.java
@@ -37,7 +37,7 @@ public class EnchantWitheredArrows extends ExcellentEnchant implements Chanced,
this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to launch an arrow with " + Placeholders.ENCHANTMENT_POTION_TYPE + " " + Placeholders.ENCHANTMENT_POTION_LEVEL + " (" + Placeholders.ENCHANTMENT_POTION_DURATION + "s.)");
this.getDefaults().setLevelMax(3);
this.getDefaults().setTier(0.5);
- this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantHover.ID, EnchantBomber.ID);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
}
@Override
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/VampiricArrowsEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/VampiricArrowsEnchant.java
new file mode 100644
index 0000000..c439858
--- /dev/null
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/bow/VampiricArrowsEnchant.java
@@ -0,0 +1,125 @@
+package su.nightexpress.excellentenchants.enchantment.impl.bow;
+
+import org.bukkit.Color;
+import org.bukkit.Particle;
+import org.bukkit.attribute.Attribute;
+import org.bukkit.enchantments.EnchantmentTarget;
+import org.bukkit.entity.Arrow;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Projectile;
+import org.bukkit.event.EventPriority;
+import org.bukkit.event.entity.EntityDamageByEntityEvent;
+import org.bukkit.event.entity.EntityRegainHealthEvent;
+import org.bukkit.event.entity.EntityShootBowEvent;
+import org.bukkit.event.entity.ProjectileHitEvent;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.NotNull;
+import su.nexmedia.engine.utils.EntityUtil;
+import su.nexmedia.engine.utils.NumberUtil;
+import su.nexmedia.engine.utils.values.UniParticle;
+import su.nightexpress.excellentenchants.ExcellentEnchants;
+import su.nightexpress.excellentenchants.Placeholders;
+import su.nightexpress.excellentenchants.api.enchantment.meta.Arrowed;
+import su.nightexpress.excellentenchants.api.enchantment.meta.Chanced;
+import su.nightexpress.excellentenchants.api.enchantment.type.BowEnchant;
+import su.nightexpress.excellentenchants.enchantment.config.EnchantScaler;
+import su.nightexpress.excellentenchants.enchantment.impl.ExcellentEnchant;
+import su.nightexpress.excellentenchants.enchantment.impl.meta.ArrowImplementation;
+import su.nightexpress.excellentenchants.enchantment.impl.meta.ChanceImplementation;
+
+public class VampiricArrowsEnchant extends ExcellentEnchant implements BowEnchant, Arrowed, Chanced {
+
+ public static final String ID = "vampiric_arrows";
+
+ public static final String PLACEHOLDER_HEAL_AMOUNT = "%heal_amount%";
+
+ private ArrowImplementation arrowImplementation;
+ private ChanceImplementation chanceImplementation;
+ private EnchantScaler healAmount;
+
+ public VampiricArrowsEnchant(@NotNull ExcellentEnchants plugin) {
+ super(plugin, ID);
+ this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to restore " + PLACEHOLDER_HEAL_AMOUNT + "❤ on arrow hit.");
+ this.getDefaults().setLevelMax(3);
+ this.getDefaults().setTier(0.3);
+ this.getDefaults().setConflicts(EnchantEnderBow.ID, EnchantGhast.ID, EnchantBomber.ID);
+ }
+
+ @Override
+ public void loadSettings() {
+ super.loadSettings();
+
+ this.arrowImplementation = ArrowImplementation.create(this, UniParticle.redstone(Color.RED, 1f));
+
+ this.chanceImplementation = ChanceImplementation.create(this, "20.0 * " + Placeholders.ENCHANTMENT_LEVEL);
+
+ this.healAmount = EnchantScaler.read(this, "Settings.Heal_Amount",
+ Placeholders.ENCHANTMENT_LEVEL,
+ "Amount of health to be restored on hit.");
+
+ this.addPlaceholder(PLACEHOLDER_HEAL_AMOUNT, level -> NumberUtil.format(this.getHealAmount(level)));
+ }
+
+ @NotNull
+ @Override
+ public EnchantmentTarget getItemTarget() {
+ return EnchantmentTarget.BOW;
+ }
+
+ @NotNull
+ @Override
+ public Arrowed getArrowImplementation() {
+ return this.arrowImplementation;
+ }
+
+ @NotNull
+ @Override
+ public Chanced getChanceImplementation() {
+ return this.chanceImplementation;
+ }
+
+ public double getHealAmount(int level) {
+ return this.healAmount.getValue(level);
+ }
+
+ @NotNull
+ @Override
+ public EventPriority getDamagePriority() {
+ return EventPriority.HIGHEST;
+ }
+
+ @Override
+ public boolean onShoot(@NotNull EntityShootBowEvent event, @NotNull LivingEntity shooter, @NotNull ItemStack bow, int level) {
+ if (!(event.getProjectile() instanceof Arrow arrow)) return false;
+ if (!this.checkTriggerChance(level)) return false;
+
+ this.addData(arrow);
+ return true;
+ }
+
+ @Override
+ public boolean onHit(@NotNull ProjectileHitEvent event, LivingEntity user, @NotNull Projectile projectile, @NotNull ItemStack bow, int level) {
+ return false;
+ }
+
+ @Override
+ public boolean onDamage(@NotNull EntityDamageByEntityEvent event, @NotNull Projectile projectile, @NotNull LivingEntity shooter, @NotNull LivingEntity victim, @NotNull ItemStack weapon, int level) {
+ double healAmount = this.getHealAmount(level);
+ if (healAmount <= 0D) return false;
+
+ double health = shooter.getHealth();
+ double maxHealth = EntityUtil.getAttribute(shooter, Attribute.GENERIC_MAX_HEALTH);
+ if (health >= maxHealth) return false;
+
+ EntityRegainHealthEvent healthEvent = new EntityRegainHealthEvent(shooter, healAmount, EntityRegainHealthEvent.RegainReason.CUSTOM);
+ plugin.getPluginManager().callEvent(healthEvent);
+ if (healthEvent.isCancelled()) return false;
+
+ shooter.setHealth(Math.min(maxHealth, health + healAmount));
+
+ if (this.hasVisualEffects()) {
+ UniParticle.of(Particle.HEART).play(shooter.getEyeLocation(), 0.25f, 0.15f, 5);
+ }
+ return false;
+ }
+}
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMediocrityEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMediocrityEnchant.java
index d167001..13175d4 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMediocrityEnchant.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMediocrityEnchant.java
@@ -88,7 +88,7 @@ public class CurseOfMediocrityEnchant extends ExcellentEnchant implements Chance
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
if (!this.checkTriggerChance(level)) return false;
event.getDrops().forEach(stack -> {
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMisfortuneEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMisfortuneEnchant.java
index 683f37c..08d6624 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMisfortuneEnchant.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/tool/CurseOfMisfortuneEnchant.java
@@ -95,7 +95,7 @@ public class CurseOfMisfortuneEnchant extends ExcellentEnchant implements Chance
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
if (!this.checkTriggerChance(level)) return false;
event.getDrops().clear();
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/universal/RestoreEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/universal/RestoreEnchant.java
new file mode 100644
index 0000000..5c9399b
--- /dev/null
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/universal/RestoreEnchant.java
@@ -0,0 +1,97 @@
+package su.nightexpress.excellentenchants.enchantment.impl.universal;
+
+import org.bukkit.Sound;
+import org.bukkit.enchantments.EnchantmentTarget;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.EventPriority;
+import org.bukkit.event.player.PlayerItemDamageEvent;
+import org.bukkit.inventory.ItemStack;
+import org.bukkit.inventory.meta.Damageable;
+import org.jetbrains.annotations.NotNull;
+import su.nexmedia.engine.api.manager.EventListener;
+import su.nexmedia.engine.utils.NumberUtil;
+import su.nexmedia.engine.utils.values.UniSound;
+import su.nightexpress.excellentenchants.ExcellentEnchants;
+import su.nightexpress.excellentenchants.Placeholders;
+import su.nightexpress.excellentenchants.api.enchantment.meta.Chanced;
+import su.nightexpress.excellentenchants.api.enchantment.type.GenericEnchant;
+import su.nightexpress.excellentenchants.enchantment.config.EnchantScaler;
+import su.nightexpress.excellentenchants.enchantment.impl.ExcellentEnchant;
+import su.nightexpress.excellentenchants.enchantment.impl.meta.ChanceImplementation;
+import su.nightexpress.excellentenchants.enchantment.util.EnchantUtils;
+
+public class RestoreEnchant extends ExcellentEnchant implements GenericEnchant, Chanced, EventListener {
+
+ public static final String ID = "restore";
+ public static final String PLACEHOLDER_DURABILITY_RESTORE = "%durability_restore%";
+
+ private ChanceImplementation chanceImplementation;
+ private EnchantScaler durabilityRestore;
+
+ public RestoreEnchant(@NotNull ExcellentEnchants plugin) {
+ super(plugin, ID);
+ this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to save item from breaking back to " + PLACEHOLDER_DURABILITY_RESTORE + "%");
+ this.getDefaults().setLevelMax(5);
+ this.getDefaults().setTier(0.6);
+ }
+
+ @Override
+ public void loadSettings() {
+ super.loadSettings();
+
+ this.chanceImplementation = ChanceImplementation.create(this,
+ "35.0 + " + Placeholders.ENCHANTMENT_LEVEL + " * 8");
+
+ this.durabilityRestore = EnchantScaler.read(this, "Settings.Durability_Restoration",
+ "25.0 + " + Placeholders.ENCHANTMENT_LEVEL + " * 5",
+ "Amount of durability (in percent of item max) to be restored.");
+
+ this.addPlaceholder(PLACEHOLDER_DURABILITY_RESTORE, level -> NumberUtil.format(this.getDurabilityRestore(level)));
+ }
+
+ @NotNull
+ @Override
+ public ChanceImplementation getChanceImplementation() {
+ return chanceImplementation;
+ }
+
+ @NotNull
+ @Override
+ public EnchantmentTarget getItemTarget() {
+ return EnchantmentTarget.BREAKABLE;
+ }
+
+ public double getDurabilityRestore(int level) {
+ return this.durabilityRestore.getValue(level);
+ }
+
+ @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
+ public void onItemDamage(PlayerItemDamageEvent event) {
+ ItemStack item = event.getItem();
+ if (!(item.getItemMeta() instanceof Damageable damageable)) return;
+
+ int damage = event.getDamage();
+ int maxDurability = item.getType().getMaxDurability();
+ if (damageable.getDamage() + damage < maxDurability) return;
+
+ int level = EnchantUtils.getLevel(item, this);
+ if (level <= 0) return;
+
+ if (this.isOutOfCharges(item)) return;
+ if (!this.checkTriggerChance(level)) return;
+
+ event.setCancelled(true);
+ this.consumeChargesNoUpdate(item, level);
+
+ double restorePercent = 100D - this.getDurabilityRestore(level);
+ int restored = (int) (maxDurability * (restorePercent / 100D));
+
+ damageable.setDamage(restored);
+ item.setItemMeta(damageable);
+ EnchantUtils.remove(item, this);
+
+ if (this.hasVisualEffects()) {
+ UniSound.of(Sound.ITEM_TOTEM_USE).play(event.getPlayer());
+ }
+ }
+}
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/CurseOfDeathEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/CurseOfDeathEnchant.java
new file mode 100644
index 0000000..53dc786
--- /dev/null
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/CurseOfDeathEnchant.java
@@ -0,0 +1,66 @@
+package su.nightexpress.excellentenchants.enchantment.impl.weapon;
+
+import org.bukkit.enchantments.EnchantmentTarget;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Player;
+import org.bukkit.event.entity.EntityDeathEvent;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.NotNull;
+import su.nightexpress.excellentenchants.ExcellentEnchants;
+import su.nightexpress.excellentenchants.Placeholders;
+import su.nightexpress.excellentenchants.api.enchantment.meta.Chanced;
+import su.nightexpress.excellentenchants.api.enchantment.type.DeathEnchant;
+import su.nightexpress.excellentenchants.enchantment.impl.ExcellentEnchant;
+import su.nightexpress.excellentenchants.enchantment.impl.meta.ChanceImplementation;
+
+public class CurseOfDeathEnchant extends ExcellentEnchant implements DeathEnchant, Chanced {
+
+ public static final String ID = "curse_of_death";
+
+ private ChanceImplementation chanceImplementation;
+
+ public CurseOfDeathEnchant(@NotNull ExcellentEnchants plugin) {
+ super(plugin, ID);
+ this.getDefaults().setDescription("When killing players, you have a chance of dying too.");
+ this.getDefaults().setLevelMax(3);
+ this.getDefaults().setTier(0D);
+ }
+
+ @Override
+ public void loadSettings() {
+ super.loadSettings();
+
+ this.chanceImplementation = ChanceImplementation.create(this, Placeholders.ENCHANTMENT_LEVEL + " * 0.1");
+ }
+
+ @NotNull
+ @Override
+ public EnchantmentTarget getItemTarget() {
+ return EnchantmentTarget.WEAPON;
+ }
+
+ @NotNull
+ @Override
+ public Chanced getChanceImplementation() {
+ return this.chanceImplementation;
+ }
+
+ @Override
+ public boolean isCursed() {
+ return true;
+ }
+
+ @Override
+ public boolean onDeath(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, ItemStack item, int level) {
+ return false;
+ }
+
+ @Override
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
+ if (!(entity instanceof Player dead)) return false;
+ if (!this.checkTriggerChance(level)) return false;
+
+ killer.setHealth(0D);
+ return true;
+ }
+}
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantDecapitator.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantDecapitator.java
index 8a90738..32bb370 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantDecapitator.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantDecapitator.java
@@ -183,7 +183,7 @@ public class EnchantDecapitator extends ExcellentEnchant implements Chanced, Dea
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
EntityType entityType = entity.getType();
if (this.ignoredEntityTypes.contains(entityType)) return false;
if (!this.checkTriggerChance(level)) return false;
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantExpHunter.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantExpHunter.java
index 0217c56..98fc483 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantExpHunter.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantExpHunter.java
@@ -48,7 +48,7 @@ public class EnchantExpHunter extends ExcellentEnchant implements DeathEnchant {
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
double expModifier = this.getExpModifier(level);
double expFinal = Math.ceil((double) event.getDroppedExp() * expModifier);
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantNimble.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantNimble.java
index f0b9c90..0a78c75 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantNimble.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantNimble.java
@@ -52,7 +52,7 @@ public class EnchantNimble extends ExcellentEnchant implements Chanced, DeathEnc
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
if (!this.checkTriggerChance(level)) return false;
event.getDrops().forEach(item -> PlayerUtil.addItem(killer, item));
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantScavenger.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantScavenger.java
index 19da38d..ffda6de 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantScavenger.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantScavenger.java
@@ -98,7 +98,7 @@ public class EnchantScavenger extends ExcellentEnchant implements Chanced, Death
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
Map> items = this.loot.get(entity.getType());
if (items == null) return false;
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantThrifty.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantThrifty.java
index bde26a3..3f4949d 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantThrifty.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/EnchantThrifty.java
@@ -80,7 +80,7 @@ public class EnchantThrifty extends ExcellentEnchant implements Chanced, DeathEn
}
@Override
- public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, int level) {
+ public boolean onKill(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull Player killer, ItemStack weapon, int level) {
if (this.ignoredEntityTypes.contains(entity.getType())) return false;
if (PDCUtil.getBoolean(entity, this.keyEntityIgnored).orElse(false)) return false;
if (!this.checkTriggerChance(level)) return false;
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/SwiperEnchant.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/SwiperEnchant.java
new file mode 100644
index 0000000..1b1746c
--- /dev/null
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/impl/weapon/SwiperEnchant.java
@@ -0,0 +1,100 @@
+package su.nightexpress.excellentenchants.enchantment.impl.weapon;
+
+import org.bukkit.enchantments.EnchantmentTarget;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Player;
+import org.bukkit.event.entity.EntityDamageByEntityEvent;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.NotNull;
+import su.nexmedia.engine.utils.NumberUtil;
+import su.nightexpress.excellentenchants.ExcellentEnchants;
+import su.nightexpress.excellentenchants.Placeholders;
+import su.nightexpress.excellentenchants.api.enchantment.meta.Chanced;
+import su.nightexpress.excellentenchants.api.enchantment.type.CombatEnchant;
+import su.nightexpress.excellentenchants.enchantment.config.EnchantScaler;
+import su.nightexpress.excellentenchants.enchantment.impl.ExcellentEnchant;
+import su.nightexpress.excellentenchants.enchantment.impl.meta.ChanceImplementation;
+
+public class SwiperEnchant extends ExcellentEnchant implements CombatEnchant, Chanced {
+
+ public static final String ID = "swiper";
+
+ public static final String PLACEHOLER_XP_AMOUNT = "%xp_amount%";
+
+ private ChanceImplementation chanceImplementation;
+ private EnchantScaler xpAmount;
+
+ public SwiperEnchant(@NotNull ExcellentEnchants plugin) {
+ super(plugin, ID);
+ this.getDefaults().setDescription(Placeholders.ENCHANTMENT_CHANCE + "% chance to steal " + PLACEHOLER_XP_AMOUNT + " XP from players.");
+ this.getDefaults().setLevelMax(3);
+ this.getDefaults().setTier(0.7);
+ }
+
+ @Override
+ public void loadSettings() {
+ super.loadSettings();
+
+ this.chanceImplementation = ChanceImplementation.create(this,
+ "5.0 + " + Placeholders.ENCHANTMENT_LEVEL + " * 2.5");
+
+ this.xpAmount = EnchantScaler.read(this, "Settings.XP_Amount",
+ Placeholders.ENCHANTMENT_LEVEL,
+ "Amount of XP to be stolen on hit.");
+
+ this.addPlaceholder(PLACEHOLER_XP_AMOUNT, level -> NumberUtil.format(this.getXPAmount(level)));
+ }
+
+ @NotNull
+ @Override
+ public EnchantmentTarget getItemTarget() {
+ return EnchantmentTarget.WEAPON;
+ }
+
+ @NotNull
+ @Override
+ public Chanced getChanceImplementation() {
+ return this.chanceImplementation;
+ }
+
+ public int getXPAmount(int level) {
+ return (int) this.xpAmount.getValue(level);
+ }
+
+ private int getExpRequired(int level) {
+ if (level <= 15) return 2 * level + 7;
+ if (level <= 30) return 5 * level - 38;
+ return 9 * level - 158;
+ }
+
+ private void addXP(@NotNull Player player, int amount) {
+ int levelHas = player.getLevel();
+ int xpHas = player.getTotalExperience();
+
+ xpHas = Math.max(0, xpHas - amount);
+ player.setExp(0F);
+ player.setTotalExperience(0);
+ player.setLevel(0);
+ player.giveExp(xpHas);
+ }
+
+ @Override
+ public boolean onAttack(@NotNull EntityDamageByEntityEvent event, @NotNull LivingEntity damager, @NotNull LivingEntity victim, @NotNull ItemStack weapon, int level) {
+ if (!(damager instanceof Player attacker)) return false;
+ if (!(victim instanceof Player defender)) return false;
+ if (defender.getTotalExperience() == 0) return false;
+ if (!this.checkTriggerChance(level)) return false;
+
+ int amount = this.getXPAmount(level);
+ if (defender.getTotalExperience() < amount) amount = defender.getTotalExperience();
+
+ this.addXP(defender, -amount);
+ this.addXP(attacker, amount);
+ return true;
+ }
+
+ @Override
+ public boolean onProtect(@NotNull EntityDamageByEntityEvent event, @NotNull LivingEntity damager, @NotNull LivingEntity victim, @NotNull ItemStack weapon, int level) {
+ return false;
+ }
+}
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/listener/EnchantGenericListener.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/listener/EnchantGenericListener.java
index 48a5ec2..ea1f043 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/listener/EnchantGenericListener.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/listener/EnchantGenericListener.java
@@ -44,9 +44,11 @@ public class EnchantGenericListener extends AbstractListener
}
}
- @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
+ @EventHandler(priority = EventPriority.MONITOR)
public void onEnchantProjectileLand(ProjectileHitEvent event) {
- EnchantUtils.removeSourceWeapon(event.getEntity());
+ this.plugin.runTask(task -> {
+ EnchantUtils.removeSourceWeapon(event.getEntity());
+ });
}
// ---------------------------------------------------------------
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/EnchantRegistry.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/EnchantRegistry.java
index a158045..ce33fb0 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/EnchantRegistry.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/EnchantRegistry.java
@@ -27,6 +27,7 @@ import su.nightexpress.excellentenchants.enchantment.impl.bow.*;
import su.nightexpress.excellentenchants.enchantment.impl.fishing.*;
import su.nightexpress.excellentenchants.enchantment.impl.tool.*;
import su.nightexpress.excellentenchants.enchantment.impl.universal.CurseOfFragilityEnchant;
+import su.nightexpress.excellentenchants.enchantment.impl.universal.RestoreEnchant;
import su.nightexpress.excellentenchants.enchantment.impl.universal.SoulboundEnchant;
import su.nightexpress.excellentenchants.enchantment.impl.weapon.*;
import su.nightexpress.excellentenchants.enchantment.registry.wrapper.DataGather;
@@ -106,6 +107,7 @@ public class EnchantRegistry extends AbstractManager {
this.register(EnchantBlindness.ID, () -> new EnchantBlindness(plugin));
this.register(EnchantConfusion.ID, () -> new EnchantConfusion(plugin));
this.register(EnchantCutter.ID, () -> new EnchantCutter(plugin));
+ this.register(CurseOfDeathEnchant.ID, () -> new CurseOfDeathEnchant(plugin));
this.register(EnchantDecapitator.ID, () -> new EnchantDecapitator(plugin));
this.register(EnchantDoubleStrike.ID, () -> new EnchantDoubleStrike(plugin));
this.register(EnchantExhaust.ID, () -> new EnchantExhaust(plugin));
@@ -119,6 +121,7 @@ public class EnchantRegistry extends AbstractManager {
this.register(EnchantRocket.ID, () -> new EnchantRocket(plugin));
this.register(EnchantScavenger.ID, () -> new EnchantScavenger(plugin));
this.register(EnchantSurprise.ID, () -> new EnchantSurprise(plugin));
+ this.register(SwiperEnchant.ID, () -> new SwiperEnchant(plugin));
this.register(EnchantTemper.ID, () -> new EnchantTemper(plugin));
this.register(EnchantThrifty.ID, () -> new EnchantThrifty(plugin));
this.register(EnchantThunder.ID, () -> new EnchantThunder(plugin));
@@ -155,6 +158,7 @@ public class EnchantRegistry extends AbstractManager {
this.register(EnchantHover.ID, () -> new EnchantHover(plugin));
this.register(SniperEnchant.ID, () -> new SniperEnchant(plugin));
this.register(EnchantPoisonedArrows.ID, () -> new EnchantPoisonedArrows(plugin));
+ this.register(VampiricArrowsEnchant.ID, () -> new VampiricArrowsEnchant(plugin));
this.register(EnchantWitheredArrows.ID, () -> new EnchantWitheredArrows(plugin));
if (Version.isAbove(Version.V1_18_R2)) {
this.register(DarknessArrowsEnchant.ID, () -> new DarknessArrowsEnchant(plugin));
@@ -165,6 +169,7 @@ public class EnchantRegistry extends AbstractManager {
this.register(CurseOfFragilityEnchant.ID, () -> new CurseOfFragilityEnchant(plugin));
this.register(CurseOfMediocrityEnchant.ID, () -> new CurseOfMediocrityEnchant(plugin));
this.register(SoulboundEnchant.ID, () -> new SoulboundEnchant(plugin));
+ this.register(RestoreEnchant.ID, () -> new RestoreEnchant(plugin));
Enchantment.stopAcceptingRegistrations();
this.plugin.info("Enchantments Registered: " + EnchantRegistry.getRegistered().size());
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/DataGathers.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/DataGathers.java
index 0df6e3b..80a018f 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/DataGathers.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/DataGathers.java
@@ -267,10 +267,9 @@ public class DataGathers {
@Override
public boolean useEnchant(@NotNull EntityDeathEvent event, @NotNull LivingEntity entity, @NotNull ItemStack item, @NotNull DeathEnchant enchant, int level) {
- Player killer = entity.getKiller();
- if (killer == null) return false;
+ if (!(entity instanceof Player killer)) return false;
- return enchant.onKill(event, entity, killer, level); // TODO item?
+ return enchant.onKill(event, event.getEntity(), killer, item, level);
}
};
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/WrappedEvent.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/WrappedEvent.java
index ec0b241..9ce3b1b 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/WrappedEvent.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/registry/wrapper/WrappedEvent.java
@@ -1,5 +1,6 @@
package su.nightexpress.excellentenchants.enchantment.registry.wrapper;
+import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Event;
import org.bukkit.event.EventPriority;
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/util/EnchantUtils.java b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/util/EnchantUtils.java
index ce33cf3..ed2253a 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/util/EnchantUtils.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/enchantment/util/EnchantUtils.java
@@ -239,7 +239,7 @@ public class EnchantUtils {
public static void consumeCharges(@NotNull ItemStack item, @NotNull ExcellentEnchant enchant, int level) {
int has = getCharges(item, enchant);
int use = enchant.getChargesConsumeAmount(level);
- setCharges(item, enchant, level,has < use ? 0 : has - use);
+ setCharges(item, enchant, level, has < use ? 0 : has - use);
}
/*public static void restoreCharges(@NotNull ItemStack item, @NotNull ExcellentEnchant enchant) {
diff --git a/NMS/pom.xml b/NMS/pom.xml
index 730d361..b7fe1cb 100644
--- a/NMS/pom.xml
+++ b/NMS/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.5.9
+ 3.6.0
4.0.0
diff --git a/V1_17_R1/pom.xml b/V1_17_R1/pom.xml
index 73ed7ae..8c68f01 100644
--- a/V1_17_R1/pom.xml
+++ b/V1_17_R1/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.5.9
+ 3.6.0
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.5.9
+ 3.6.0
diff --git a/V1_18_R2/pom.xml b/V1_18_R2/pom.xml
index 5b2a71f..2b0d013 100644
--- a/V1_18_R2/pom.xml
+++ b/V1_18_R2/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.5.9
+ 3.6.0
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.5.9
+ 3.6.0
diff --git a/V1_19_R3/pom.xml b/V1_19_R3/pom.xml
index 4068d37..7716f3d 100644
--- a/V1_19_R3/pom.xml
+++ b/V1_19_R3/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.5.9
+ 3.6.0
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.5.9
+ 3.6.0
diff --git a/V1_20_R1/pom.xml b/V1_20_R1/pom.xml
index 28e0214..8b041ab 100644
--- a/V1_20_R1/pom.xml
+++ b/V1_20_R1/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.5.9
+ 3.6.0
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.5.9
+ 3.6.0
diff --git a/V1_20_R2/pom.xml b/V1_20_R2/pom.xml
index 84b4c86..1830142 100644
--- a/V1_20_R2/pom.xml
+++ b/V1_20_R2/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.5.9
+ 3.6.0
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.5.9
+ 3.6.0
diff --git a/pom.xml b/pom.xml
index 284537e..5e9c7f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
su.nightexpress.excellentenchants
ExcellentEnchants
pom
- 3.5.9
+ 3.6.0
Core
NMS