mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-25 20:25:45 +01:00
Send Silk Touch message to action bar
This commit is contained in:
parent
89922c3255
commit
67dc1dfe88
@ -13,6 +13,7 @@
|
|||||||
package me.blackvein.quests.listeners;
|
package me.blackvein.quests.listeners;
|
||||||
|
|
||||||
import me.blackvein.quests.Quester;
|
import me.blackvein.quests.Quester;
|
||||||
|
import me.blackvein.quests.nms.ActionBarProvider;
|
||||||
import me.blackvein.quests.quests.IQuest;
|
import me.blackvein.quests.quests.IQuest;
|
||||||
import me.blackvein.quests.player.IQuester;
|
import me.blackvein.quests.player.IQuester;
|
||||||
import me.blackvein.quests.Quests;
|
import me.blackvein.quests.Quests;
|
||||||
@ -78,8 +79,8 @@ public class BlockListener implements Listener {
|
|||||||
if (currentStage.containsObjective(breakType)) {
|
if (currentStage.containsObjective(breakType)) {
|
||||||
if (quest.getOptions().canIgnoreSilkTouch()
|
if (quest.getOptions().canIgnoreSilkTouch()
|
||||||
&& player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
&& player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
||||||
Lang.send(player, ChatColor.RED + Lang.get(player, "optionSilkTouchFail")
|
ActionBarProvider.sendActionBar(player, ChatColor.RED + Lang
|
||||||
.replace("<quest>", quest.getName()));
|
.get(player, "optionSilkTouchFail").replace("<quest>", quest.getName()));
|
||||||
} else {
|
} else {
|
||||||
quester.breakBlock(quest, blockItemStack);
|
quester.breakBlock(quest, blockItemStack);
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ public class BukkitQuestFactory implements QuestFactory, ConversationAbandonedLi
|
|||||||
context.setSessionData(CK.Q_NAME, q.getName());
|
context.setSessionData(CK.Q_NAME, q.getName());
|
||||||
context.setSessionData(CK.Q_ASK_MESSAGE, q.getDescription());
|
context.setSessionData(CK.Q_ASK_MESSAGE, q.getDescription());
|
||||||
context.setSessionData(CK.Q_FINISH_MESSAGE, q.getFinished());
|
context.setSessionData(CK.Q_FINISH_MESSAGE, q.getFinished());
|
||||||
if(plugin.getDependencies().getCitizens() != null) {
|
if (plugin.getDependencies().getCitizens() != null) {
|
||||||
if (q.getNpcStart() != null) {
|
if (q.getNpcStart() != null) {
|
||||||
context.setSessionData(CK.Q_START_NPC, q.getNpcStart().getId());
|
context.setSessionData(CK.Q_START_NPC, q.getNpcStart().getId());
|
||||||
}
|
}
|
||||||
|
@ -794,7 +794,7 @@ requirements: "Requirements"
|
|||||||
requirementsItemFail: "Unable to collect required item. Is it in your off-hand?"
|
requirementsItemFail: "Unable to collect required item. Is it in your off-hand?"
|
||||||
conditionFailQuit: "Condition failed. You have quit <quest>."
|
conditionFailQuit: "Condition failed. You have quit <quest>."
|
||||||
conditionFailRetry: "Condition not yet met for this stage of <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"
|
with: "with"
|
||||||
to: "to"
|
to: "to"
|
||||||
blocksWithin: "within <amount> blocks of"
|
blocksWithin: "within <amount> blocks of"
|
||||||
|
Loading…
Reference in New Issue
Block a user