Skip to content

Commit

Permalink
Update minimessage lang, fix double minimessage conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Feb 25, 2024
1 parent 788ba7e commit aeb201c
Show file tree
Hide file tree
Showing 3 changed files with 719 additions and 548 deletions.
4 changes: 2 additions & 2 deletions AreaShop/src/main/java/me/wiefferink/areashop/AreaShop.java
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,11 @@ private void performLanguageMigrations() {
for (File file : langFiles) {
String name = file.getName();
String langName = name.substring(0, name.length() - 4);
File toMigrate = new File(existingLanguages, langName + "-MM.yml");
if (toMigrate.exists()) {
if (langName.endsWith("-MM")) {
debug("Skipping migration for " + langName + " as it already exists.");
continue;
}
File toMigrate = new File(existingLanguages, langName + "-MM.yml");
try {
LanguageConverter.performConversion(file, toMigrate);
} catch (IOException ex) {
Expand Down
3 changes: 3 additions & 0 deletions AreaShop/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ chatPrefix:
# WorldGuard doesn't support MiniMessage, so when setting WorldGuard Greetings, this prefix is used instead. (Bukkit color codes)
wgPrefix: '&2[AreaShop] &r'

# Whether languages should be migrated to MiniMessage
migrateLanguages: false

# The language file that should be used, check the 'lang' folder for build-in languages (use the filename without .yml here).
# More information can be found here: https://github.com/NLthijs48/AreaShop/wiki/Language-support.
# NOTE: If you want to use MiniMessage, make sure you're using mmLanguage below.
Expand Down
Loading

0 comments on commit aeb201c

Please sign in to comment.