mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-21 18:15:32 +01:00
Inform lack of crafting space, see #2247
This commit is contained in:
parent
9d729dc6ae
commit
10880e8a2e
@ -12,9 +12,12 @@ package me.pikamug.quests.listeners;
|
|||||||
|
|
||||||
import me.pikamug.quests.BukkitQuestsPlugin;
|
import me.pikamug.quests.BukkitQuestsPlugin;
|
||||||
import me.pikamug.quests.enums.ObjectiveType;
|
import me.pikamug.quests.enums.ObjectiveType;
|
||||||
|
import me.pikamug.quests.nms.BukkitActionBarProvider;
|
||||||
import me.pikamug.quests.player.Quester;
|
import me.pikamug.quests.player.Quester;
|
||||||
import me.pikamug.quests.quests.Quest;
|
import me.pikamug.quests.quests.Quest;
|
||||||
import me.pikamug.quests.util.BukkitInventoryUtil;
|
import me.pikamug.quests.util.BukkitInventoryUtil;
|
||||||
|
import me.pikamug.quests.util.BukkitLang;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -66,6 +69,8 @@ public class BukkitItemListener implements Listener {
|
|||||||
&& quester.getCurrentStage(quest).containsObjective(type)) {
|
&& quester.getCurrentStage(quest).containsObjective(type)) {
|
||||||
if (BukkitInventoryUtil.getEmptySlots(player)
|
if (BukkitInventoryUtil.getEmptySlots(player)
|
||||||
< craftedItem.getAmount() / craftedItem.getMaxStackSize()) {
|
< craftedItem.getAmount() / craftedItem.getMaxStackSize()) {
|
||||||
|
BukkitActionBarProvider.sendActionBar(player, ChatColor.RED + BukkitLang.get(player,
|
||||||
|
"inventoryFull"));
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -790,6 +790,7 @@ noPermission: "You do not have permission to do that."
|
|||||||
trialMode: "Trial Mode"
|
trialMode: "Trial Mode"
|
||||||
modeDeny: "You are unable to do that in <mode>."
|
modeDeny: "You are unable to do that in <mode>."
|
||||||
duplicateEditor: "You are already using an editor!"
|
duplicateEditor: "You are already using an editor!"
|
||||||
|
inventoryFull: "Not enough inventory space."
|
||||||
difference: "The difference is %gold%<data>%gray%."
|
difference: "The difference is %gold%<data>%gray%."
|
||||||
notInstalled: "Not installed"
|
notInstalled: "Not installed"
|
||||||
confirmDelete: "Are you sure?"
|
confirmDelete: "Are you sure?"
|
||||||
|
Loading…
Reference in New Issue
Block a user