Skip to content

Commit e98bc49

Browse files
committed
Parse placeholders on discord message reward
1 parent 8b2209a commit e98bc49

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

VotingPlugin/src/main/java/com/bencodez/votingplugin/discord/DiscordHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ public void load() {
5454
public String onRewardRequested(Reward arg0, com.bencodez.advancedcore.api.user.AdvancedCoreUser user,
5555
ConfigurationSection section, HashMap<String, String> placeholders) {
5656
if (section.getBoolean("Enabled")) {
57-
sendRewardMessage(PlaceholderUtils
58-
.replacePlaceHolder(section.getString("Message", "Please set a message"), placeholders),
59-
section.getString("ChannelID", "0"));
57+
String msg = PlaceholderUtils
58+
.replacePlaceHolder(section.getString("Message", "Please set a message"), placeholders);
59+
msg = PlaceholderUtils.replacePlaceHolders(user.getOfflinePlayer(), msg);
60+
sendRewardMessage(msg, section.getString("ChannelID", "0"));
6061
}
6162
return null;
6263
}

0 commit comments

Comments
 (0)