Send Silk Touch message to action bar

This commit is contained in:
PikaMug 2022-04-11 13:38:23 -04:00
parent 89922c3255
commit 67dc1dfe88
3 changed files with 5 additions and 4 deletions

View File

@ -13,6 +13,7 @@
package me.blackvein.quests.listeners;
import me.blackvein.quests.Quester;
import me.blackvein.quests.nms.ActionBarProvider;
import me.blackvein.quests.quests.IQuest;
import me.blackvein.quests.player.IQuester;
import me.blackvein.quests.Quests;
@ -78,8 +79,8 @@ public class BlockListener implements Listener {
if (currentStage.containsObjective(breakType)) {
if (quest.getOptions().canIgnoreSilkTouch()
&& player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
Lang.send(player, ChatColor.RED + Lang.get(player, "optionSilkTouchFail")
.replace("<quest>", quest.getName()));
ActionBarProvider.sendActionBar(player, ChatColor.RED + Lang
.get(player, "optionSilkTouchFail").replace("<quest>", quest.getName()));
} else {
quester.breakBlock(quest, blockItemStack);

View File

@ -149,7 +149,7 @@ public class BukkitQuestFactory implements QuestFactory, ConversationAbandonedLi
context.setSessionData(CK.Q_NAME, q.getName());
context.setSessionData(CK.Q_ASK_MESSAGE, q.getDescription());
context.setSessionData(CK.Q_FINISH_MESSAGE, q.getFinished());
if(plugin.getDependencies().getCitizens() != null) {
if (plugin.getDependencies().getCitizens() != null) {
if (q.getNpcStart() != null) {
context.setSessionData(CK.Q_START_NPC, q.getNpcStart().getId());
}

View File

@ -794,7 +794,7 @@ requirements: "Requirements"
requirementsItemFail: "Unable to collect required item. Is it in your off-hand?"
conditionFailQuit: "Condition failed. You have quit <quest>."
conditionFailRetry: "Condition not yet met for this stage of <quest>."
optionSilkTouchFail: "Unable to progress <quest> with the Silk Touch enchantment."
optionSilkTouchFail: "Cannot progress <quest> with the Silk Touch enchantment."
with: "with"
to: "to"
blocksWithin: "within <amount> blocks of"