Skip to content

Commit

Permalink
Use default language setting
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Jul 24, 2024
1 parent 1f49641 commit 2cf946f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public Component getMessage(Message message, Language language, Object... argume
}

public Component getMessage(Message message, PlayerProfile playerProfile, Object... arguments) {
return getMessage(message, playerProfile.getLanguage(), arguments);
Language selectedLanguage = playerProfile.getLanguage();

return getMessage(message, selectedLanguage != null ? selectedLanguage : Language.valueOf(plugin.getConfig().getString("default-language")), arguments);
}

public Component getMessage(Message message, UUID playerUuid, Object... arguments) {
Expand Down

0 comments on commit 2cf946f

Please sign in to comment.