mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-29 11:41:39 +01:00
Support PlaceholderAPI variables in objective-overrides, per #980
This commit is contained in:
parent
fd04e25976
commit
2c5f09dec8
@ -2082,7 +2082,7 @@ public class Quester {
|
||||
if (getCurrentStage(quest).objectiveOverride != null) {
|
||||
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") " + getCurrentStage(quest)
|
||||
.objectiveOverride;
|
||||
p.sendMessage(message);
|
||||
p.sendMessage(ConfigUtil.parseString(message, p));
|
||||
} else if (objective.equalsIgnoreCase("password")) {
|
||||
String message = ChatColor.GREEN + "(" + Lang.get(p, "completed") + ") " + pass;
|
||||
p.sendMessage(message);
|
||||
|
@ -151,6 +151,14 @@ public class ConfigUtil {
|
||||
}
|
||||
return parsed;
|
||||
}
|
||||
|
||||
public static String parseString(String s, Player player) {
|
||||
String parsed = parseString(s);
|
||||
if (Dependencies.placeholder != null && player != null) {
|
||||
parsed = PlaceholderAPI.setPlaceholders(player, parsed);
|
||||
}
|
||||
return parsed;
|
||||
}
|
||||
|
||||
public static String parseString(String s, NPC npc) {
|
||||
String parsed = parseString(s);
|
||||
|
Loading…
Reference in New Issue
Block a user