mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-22 10:36:00 +01:00
Fix placeholder replacements not working
This commit is contained in:
parent
73a49f779b
commit
dea38a1579
@ -117,8 +117,6 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
|
|||||||
.toArray(Material[]::new);
|
.toArray(Material[]::new);
|
||||||
signVariables = getConfig().getStringList("sign-variables").stream().map(String::toLowerCase).collect(Collectors.toSet());
|
signVariables = getConfig().getStringList("sign-variables").stream().map(String::toLowerCase).collect(Collectors.toSet());
|
||||||
lang = new LanguageManager(this, getConfig().getString("lang"));
|
lang = new LanguageManager(this, getConfig().getString("lang"));
|
||||||
lang.setPlaceholderPrefix("{");
|
|
||||||
lang.setPlaceholderSuffix("}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initOptionParsers() {
|
private void initOptionParsers() {
|
||||||
@ -288,7 +286,11 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BaseComponent[] getComponentMessage(CommandSender sender, String key, String... replacements) {
|
public BaseComponent[] getComponentMessage(CommandSender sender, String key, String... replacements) {
|
||||||
return MineDown.parse(getLang(sender, key), replacements);
|
return new MineDown(getLang(sender, key))
|
||||||
|
.placeholderPrefix("{")
|
||||||
|
.placeholderSuffix("}")
|
||||||
|
.replace(replacements)
|
||||||
|
.toComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTextMessage(CommandSender sender, String key, String... replacements) {
|
public String getTextMessage(CommandSender sender, String key, String... replacements) {
|
||||||
|
Loading…
Reference in New Issue
Block a user