Addendum to previous commit

This commit is contained in:
PikaMug 2024-07-04 06:46:20 -04:00
parent 82804e700d
commit 8f89eb9d8c

View File

@ -3347,34 +3347,34 @@ public class BukkitQuester implements Quester {
final String message = formatCompletedObjectiveMessage("place", goal.getAmount()); final String message = formatCompletedObjectiveMessage("place", goal.getAmount());
if (plugin.getConfigSettings().canTranslateNames() && !goal.hasItemMeta() if (plugin.getConfigSettings().canTranslateNames() && !goal.hasItemMeta()
&& !goal.getItemMeta().hasDisplayName()) { && !goal.getItemMeta().hasDisplayName()) {
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
null)) { null)) {
sendMessage(message.replace("<item>", BukkitItemUtil.getName(increment))); sendMessage(message.replace("<item>", BukkitItemUtil.getName(goal)));
} }
} else { } else {
sendMessage(message.replace("<item>", BukkitItemUtil.getName(increment))); sendMessage(message.replace("<item>", BukkitItemUtil.getName(goal)));
} }
} else if (type.equals(ObjectiveType.USE_BLOCK)) { } else if (type.equals(ObjectiveType.USE_BLOCK)) {
final String message = formatCompletedObjectiveMessage("use", goal.getAmount()); final String message = formatCompletedObjectiveMessage("use", goal.getAmount());
if (plugin.getConfigSettings().canTranslateNames() && !goal.hasItemMeta() if (plugin.getConfigSettings().canTranslateNames() && !goal.hasItemMeta()
&& !goal.getItemMeta().hasDisplayName()) { && !goal.getItemMeta().hasDisplayName()) {
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
null)) { null)) {
sendMessage(message.replace("<item>", BukkitItemUtil.getName(increment))); sendMessage(message.replace("<item>", BukkitItemUtil.getName(goal)));
} }
} else { } else {
sendMessage(message.replace("<item>", BukkitItemUtil.getName(increment))); sendMessage(message.replace("<item>", BukkitItemUtil.getName(goal)));
} }
} else if (type.equals(ObjectiveType.CUT_BLOCK)) { } else if (type.equals(ObjectiveType.CUT_BLOCK)) {
final String message = formatCompletedObjectiveMessage("cut", goal.getAmount()); final String message = formatCompletedObjectiveMessage("cut", goal.getAmount());
if (plugin.getConfigSettings().canTranslateNames() && !goal.hasItemMeta() if (plugin.getConfigSettings().canTranslateNames() && !goal.hasItemMeta()
&& !goal.getItemMeta().hasDisplayName()) { && !goal.getItemMeta().hasDisplayName()) {
if (!plugin.getLocaleManager().sendMessage(p, message, increment.getType(), increment.getDurability(), if (!plugin.getLocaleManager().sendMessage(p, message, goal.getType(), goal.getDurability(),
null)) { null)) {
sendMessage(message.replace("<item>", BukkitItemUtil.getName(increment))); sendMessage(message.replace("<item>", BukkitItemUtil.getName(goal)));
} }
} else { } else {
sendMessage(message.replace("<item>", BukkitItemUtil.getName(increment))); sendMessage(message.replace("<item>", BukkitItemUtil.getName(goal)));
} }
} else if (type.equals(ObjectiveType.CRAFT_ITEM)) { } else if (type.equals(ObjectiveType.CRAFT_ITEM)) {
final ItemStack is = ((BukkitStage) getCurrentStage(quest)).getItemsToCraft().get(getCurrentStage(quest).getItemsToCraft() final ItemStack is = ((BukkitStage) getCurrentStage(quest)).getItemsToCraft().get(getCurrentStage(quest).getItemsToCraft()