diff --git a/.gitignore b/.gitignore
index 4459b58..c48c708 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,5 @@
/target/
/V1_18_R2/pom.xml.versionsBackup
/V1_18_R2/target/
+/V1_19_R1/target/
+/V1_19_R1/pom.xml.versionsBackup
diff --git a/Core/pom.xml b/Core/pom.xml
index 9971e97..ccffb67 100644
--- a/Core/pom.xml
+++ b/Core/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.2.6
+ 3.2.7
4.0.0
@@ -36,22 +36,22 @@
su.nightexpress.excellentenchants
NMS
- 3.2.6
+ 3.2.7
su.nightexpress.excellentenchants
V1_17_R1
- 3.2.6
+ 3.2.7
su.nightexpress.excellentenchants
V1_18_R2
- 3.2.6
+ 3.2.7
su.nightexpress.excellentenchants
V1_19_R1
- 3.2.6
+ 3.2.7
fr.neatmonster
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/ExcellentEnchants.java b/Core/src/main/java/su/nightexpress/excellentenchants/ExcellentEnchants.java
index 532292b..526ac4d 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/ExcellentEnchants.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/ExcellentEnchants.java
@@ -5,6 +5,7 @@ import org.jetbrains.annotations.NotNull;
import su.nexmedia.engine.NexPlugin;
import su.nexmedia.engine.Version;
import su.nexmedia.engine.api.command.GeneralCommand;
+import su.nexmedia.engine.command.list.ReloadSubCommand;
import su.nexmedia.engine.utils.Reflex;
import su.nightexpress.excellentenchants.command.BookCommand;
import su.nightexpress.excellentenchants.command.EnchantCommand;
@@ -85,6 +86,7 @@ public class ExcellentEnchants extends NexPlugin {
mainCommand.addChildren(new EnchantCommand(this));
mainCommand.addChildren(new ListCommand(this));
mainCommand.addChildren(new TierbookCommand(this));
+ mainCommand.addChildren(new ReloadSubCommand<>(this, Perms.PREFIX + "admin"));
}
@Override
@@ -92,6 +94,11 @@ public class ExcellentEnchants extends NexPlugin {
}
+ @Override
+ public void registerPermissions() {
+ // TODO
+ }
+
@NotNull
public EnchantManager getEnchantManager() {
return this.enchantManager;
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSilkChest.java b/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSilkChest.java
index fd54079..3b7c9a6 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSilkChest.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSilkChest.java
@@ -125,7 +125,7 @@ public class EnchantSilkChest extends IEnchantChanceTemplate implements CustomDr
if (!this.takeCostItem(player)) return;
// Добавляем в сундук обратно предметы из дроп листа, кроме самого сундука.
- parent.getItems().removeIf(drop -> drop.getItemStack().getType() == state.getType());
+ parent.getItems().removeIf(drop -> drop.getItemStack().getType() == state.getType() && drop.getItemStack().getAmount() == 1);
chest.getBlockInventory().addItem(parent.getItems().stream().map(Item::getItemStack).toList().toArray(new ItemStack[0]));
// Добавляем кастомный сундук в кастомный дроп лист.
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSmelter.java b/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSmelter.java
index 6b5981b..a6aa542 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSmelter.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/manager/enchants/tool/EnchantSmelter.java
@@ -5,6 +5,7 @@ import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.block.Block;
+import org.bukkit.block.Container;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockDropItemEvent;
@@ -90,6 +91,7 @@ public class EnchantSmelter extends IEnchantChanceTemplate implements BlockDropE
@Override
public boolean use(@NotNull BlockDropItemEvent e, @NotNull Player player, @NotNull ItemStack item, int level) {
+ if (e.getBlockState() instanceof Container) return false;
if (!this.isEnchantmentAvailable(player)) return false;
if (!this.checkTriggerChance(level)) return false;
if (e.getItems().stream().noneMatch(drop -> this.isSmeltable(drop.getItemStack().getType()))) return false;
diff --git a/Core/src/main/java/su/nightexpress/excellentenchants/manager/listeners/EnchantHandlerListener.java b/Core/src/main/java/su/nightexpress/excellentenchants/manager/listeners/EnchantHandlerListener.java
index de8bcaf..b52cf56 100644
--- a/Core/src/main/java/su/nightexpress/excellentenchants/manager/listeners/EnchantHandlerListener.java
+++ b/Core/src/main/java/su/nightexpress/excellentenchants/manager/listeners/EnchantHandlerListener.java
@@ -156,7 +156,7 @@ public class EnchantHandlerListener extends AbstractListener
});
// Prevent to apply enchants multiple times on hits.
- this.removeSourceWeapon(projectile);
+ this.plugin.getScheduler().runTask(this.plugin, c -> this.removeSourceWeapon(projectile));
}
// ---------------------------------------------------------------
diff --git a/Core/src/main/resources/enchants/thrifty.yml b/Core/src/main/resources/enchants/thrifty.yml
index c3087e9..e9c9070 100644
--- a/Core/src/main/resources/enchants/thrifty.yml
+++ b/Core/src/main/resources/enchants/thrifty.yml
@@ -101,5 +101,5 @@ Settings:
# https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
Ignored_Spawn_Reasons:
- SPAWNER
- - SPAWN_EGG
+ - SPAWNER_EGG
- DISPENSE_EGG
diff --git a/NMS/pom.xml b/NMS/pom.xml
index 30e30f9..7d1f2eb 100644
--- a/NMS/pom.xml
+++ b/NMS/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.2.6
+ 3.2.7
4.0.0
diff --git a/V1_17_R1/pom.xml b/V1_17_R1/pom.xml
index 2621e5f..9df79f3 100644
--- a/V1_17_R1/pom.xml
+++ b/V1_17_R1/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.2.6
+ 3.2.7
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.2.6
+ 3.2.7
diff --git a/V1_18_R2/pom.xml b/V1_18_R2/pom.xml
index 8a5f149..74cd5c7 100644
--- a/V1_18_R2/pom.xml
+++ b/V1_18_R2/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.2.6
+ 3.2.7
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.2.6
+ 3.2.7
diff --git a/V1_19_R1/pom.xml b/V1_19_R1/pom.xml
index a65ba3c..fd308ef 100644
--- a/V1_19_R1/pom.xml
+++ b/V1_19_R1/pom.xml
@@ -5,7 +5,7 @@
ExcellentEnchants
su.nightexpress.excellentenchants
- 3.2.6
+ 3.2.7
4.0.0
@@ -26,7 +26,7 @@
su.nightexpress.excellentenchants
NMS
- 3.2.6
+ 3.2.7
diff --git a/pom.xml b/pom.xml
index 9778dbf..45364b1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
su.nightexpress.excellentenchants
ExcellentEnchants
pom
- 3.2.6
+ 3.2.7
Core
NMS
@@ -25,7 +25,7 @@
su.nexmedia
NexEngine
- 2.2.3
+ 2.2.6