diff --git a/src/main/java/fr/openmc/core/features/adminshop/AdminShopManager.java b/src/main/java/fr/openmc/core/features/adminshop/AdminShopManager.java
index 87750f44e..4fa4d3d60 100644
--- a/src/main/java/fr/openmc/core/features/adminshop/AdminShopManager.java
+++ b/src/main/java/fr/openmc/core/features/adminshop/AdminShopManager.java
@@ -92,6 +92,11 @@ public static void buyItem(Player player, String itemId, int amount) {
ShopItem item = getCurrentItem(player, itemId);
if (item == null) return;
+ if (amount <= 0) {
+ sendError(player, TranslationManager.translation("feature.adminshop.amount_sup"));
+ return;
+ }
+
if (!ItemUtils.hasEnoughSpace(player, item.getMaterial(), amount)) {
sendError(player, TranslationManager.translation("feature.adminshop.inventory_full"));
return;
@@ -128,6 +133,11 @@ public static void sellItem(Player player, String itemId, int amount) {
ShopItem item = getCurrentItem(player, itemId); // Get the item from the current category
if (item == null) return;
+ if (amount <= 0) {
+ sendError(player, TranslationManager.translation("feature.adminshop.amount_sup"));
+ return;
+ }
+
// Check if the initial sell price is valid
if (item.getInitialSellPrice() <= 0) {
sendError(player, TranslationManager.translation("feature.adminshop.item_not_buyable"));
diff --git a/src/main/resources/translations/default/adminshop.properties b/src/main/resources/translations/default/adminshop.properties
index 458901e32..5c1f1f93e 100644
--- a/src/main/resources/translations/default/adminshop.properties
+++ b/src/main/resources/translations/default/adminshop.properties
@@ -31,6 +31,7 @@ feature.adminshop.menu.log_variants.log=Bûches
feature.adminshop.have_enough_item=Vous n'avez pas cet item dans votre inventaire !
feature.adminshop.have_enough_money=Vous n'avez pas assez d'argent !
feature.adminshop.inventory_full=Votre inventaire est plein !
+feature.adminshop.amount_sup=La quantité choisie doit être supérieure à 0
feature.adminshop.item_not_sellable=Ce produit n'est pas vendable !
feature.adminshop.item_not_buyable=Ce produit n'est pas achetable !
feature.adminshop.player_not_enough_item=Vous n'avez pas assez de cet item dans votre inventaire !
diff --git a/src/main/resources/translations/en_GB/adminshop.properties b/src/main/resources/translations/en_GB/adminshop.properties
index 51fa8d6a5..f8b530658 100644
--- a/src/main/resources/translations/en_GB/adminshop.properties
+++ b/src/main/resources/translations/en_GB/adminshop.properties
@@ -31,6 +31,7 @@ feature.adminshop.menu.log_variants.log=Logs
feature.adminshop.have_enough_item=You do not have this item in your inventory!
feature.adminshop.have_enough_money=You don't have enough money!
feature.adminshop.inventory_full=Your inventory is full!
+feature.adminshop.amount_sup=The quantity must be superior to 1!
feature.adminshop.item_not_sellable=This product is not for sale!
feature.adminshop.item_not_buyable=This product is not purchasable!
feature.adminshop.player_not_enough_item=You don't have enough of this item in your inventory!
diff --git a/src/main/resources/translations/en_US/adminshop.properties b/src/main/resources/translations/en_US/adminshop.properties
index 51fa8d6a5..f8b530658 100644
--- a/src/main/resources/translations/en_US/adminshop.properties
+++ b/src/main/resources/translations/en_US/adminshop.properties
@@ -31,6 +31,7 @@ feature.adminshop.menu.log_variants.log=Logs
feature.adminshop.have_enough_item=You do not have this item in your inventory!
feature.adminshop.have_enough_money=You don't have enough money!
feature.adminshop.inventory_full=Your inventory is full!
+feature.adminshop.amount_sup=The quantity must be superior to 1!
feature.adminshop.item_not_sellable=This product is not for sale!
feature.adminshop.item_not_buyable=This product is not purchasable!
feature.adminshop.player_not_enough_item=You don't have enough of this item in your inventory!