Apply color codes to welcome message #1344

This commit is contained in:
sgdc3 2017-10-04 20:29:30 +02:00
parent 816e751fe7
commit 0630c270ca

View File

@ -21,6 +21,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@ -70,7 +71,10 @@ public class WelcomeMessageConfiguration implements Reloadable {
@PostConstruct
@Override
public void reload() {
List<String> welcomeMessage = readWelcomeFile();
List<String> welcomeMessage = new ArrayList<>();
for(String line : readWelcomeFile()) {
welcomeMessage.add(ChatColor.translateAlternateColorCodes('&', line));
}
messageSupplier = TagReplacer.newReplacer(availableTags, welcomeMessage);
}