Fix language switching prompt and save

This commit is contained in:
Secretboy-SMR 2022-05-10 22:57:52 +08:00 committed by Melledy
parent 4efdc767ae
commit 2969abc20e

View File

@ -35,8 +35,9 @@ public final class LanguageCommand implements CommandHandler {
if (sender != null) {
var locale = Locale.forLanguageTag(langCode);
actualLangCode = Utils.getLanguageCode(locale);
sender.getAccount().setLocale(locale);
return;
var account = sender.getAccount();
account.setLocale(locale);
account.save();
}
else {
var languageInst = Grasscutter.getLanguage(langCode);