mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-14 22:55:54 +01:00
Allow color codes and tags in objective-overrides, part 2. Per #1047
This commit is contained in:
parent
2dea1eeebb
commit
b352adda94
@ -578,7 +578,13 @@ public class Quester {
|
||||
if (getCurrentStage(quest) != null) {
|
||||
if (getCurrentStage(quest).objectiveOverride != null) {
|
||||
LinkedList<String> objectives = new LinkedList<String>();
|
||||
objectives.add(ChatColor.GREEN + getCurrentStage(quest).objectiveOverride);
|
||||
String message = ChatColor.GREEN + ConfigUtil.parseString(
|
||||
ChatColor.translateAlternateColorCodes('&', getCurrentStage(quest).objectiveOverride),
|
||||
quest, getPlayer());
|
||||
if (plugin.getDependencies().getPlaceholderApi() != null) {
|
||||
message = PlaceholderAPI.setPlaceholders(getPlayer(), message);
|
||||
}
|
||||
objectives.add(message);
|
||||
return objectives;
|
||||
}
|
||||
}
|
||||
@ -2073,8 +2079,9 @@ public class Quester {
|
||||
String pass, CustomObjective co) {
|
||||
Player p = getPlayer();
|
||||
if (getCurrentStage(quest).objectiveOverride != null) {
|
||||
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") " + getCurrentStage(quest)
|
||||
.objectiveOverride;
|
||||
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") "
|
||||
+ ConfigUtil.parseString(ChatColor.translateAlternateColorCodes('&',
|
||||
getCurrentStage(quest).objectiveOverride), quest, p);
|
||||
if (plugin.getDependencies().getPlaceholderApi() != null) {
|
||||
message = PlaceholderAPI.setPlaceholders(p, message);
|
||||
}
|
||||
|
@ -663,8 +663,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
}
|
||||
if (!ignoreOverrides) {
|
||||
if (quester.getCurrentStage(quest).objectiveOverride != null) {
|
||||
String message = ChatColor.GREEN + ConfigUtil.parseString(ChatColor.GREEN
|
||||
+ ChatColor.translateAlternateColorCodes('&',
|
||||
String message = ChatColor.GREEN + ConfigUtil.parseString(ChatColor.translateAlternateColorCodes('&',
|
||||
quester.getCurrentStage(quest).objectiveOverride), quest, quester.getPlayer());
|
||||
if (depends.getPlaceholderApi() != null) {
|
||||
message = PlaceholderAPI.setPlaceholders(quester.getPlayer(), message);
|
||||
|
Loading…
Reference in New Issue
Block a user