diff --git a/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java b/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java index 9cabcb42d..e3aa606b6 100644 --- a/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java +++ b/core/src/main/java/me/pikamug/quests/listeners/BukkitItemListener.java @@ -12,9 +12,12 @@ package me.pikamug.quests.listeners; import me.pikamug.quests.BukkitQuestsPlugin; import me.pikamug.quests.enums.ObjectiveType; +import me.pikamug.quests.nms.BukkitActionBarProvider; import me.pikamug.quests.player.Quester; import me.pikamug.quests.quests.Quest; import me.pikamug.quests.util.BukkitInventoryUtil; +import me.pikamug.quests.util.BukkitLang; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -66,6 +69,8 @@ public class BukkitItemListener implements Listener { && quester.getCurrentStage(quest).containsObjective(type)) { if (BukkitInventoryUtil.getEmptySlots(player) < craftedItem.getAmount() / craftedItem.getMaxStackSize()) { + BukkitActionBarProvider.sendActionBar(player, ChatColor.RED + BukkitLang.get(player, + "inventoryFull")); event.setCancelled(true); return; } diff --git a/core/src/main/resources/strings.yml b/core/src/main/resources/strings.yml index fdfff1d0c..f784c7506 100644 --- a/core/src/main/resources/strings.yml +++ b/core/src/main/resources/strings.yml @@ -790,6 +790,7 @@ noPermission: "You do not have permission to do that." trialMode: "Trial Mode" modeDeny: "You are unable to do that in ." duplicateEditor: "You are already using an editor!" +inventoryFull: "Not enough inventory space." difference: "The difference is %gold%%gray%." notInstalled: "Not installed" confirmDelete: "Are you sure?"