@@ -391,14 +391,14 @@ private List<String> postProcess(@NotNull List<String> text) {
391391 public List <String > forLocale (@ NotNull String locale ) {
392392 JsonConfiguration index = mapping .get (locale );
393393 if (index == null ) {
394- if (plugin .getConfiguration ().getString ( " language" ).equals (locale )) {
394+ if (MsgUtil . processGameLanguageCode ( plugin .getConfiguration ().getOrDefault ( "game- language", "default" ) ).equals (locale )) {
395395 List <String > str = fallbackLocal ();
396396 if (str .isEmpty ()) {
397397 return Collections .singletonList ("Fallback Missing Language Key: " + path + ", report to QuickShop!" );
398398 }
399399 return postProcess (str );
400400 } else {
401- return forLocale (plugin .getConfiguration ().getString ( " language" ));
401+ return forLocale (MsgUtil . processGameLanguageCode ( plugin .getConfiguration ().getOrDefault ( "game- language", "default" ) ));
402402 }
403403 } else {
404404 List <String > str = index .getStringList (path );
@@ -422,7 +422,7 @@ public List<String> forLocale() {
422422 if (sender instanceof Player ) {
423423 return forLocale (((Player ) sender ).getLocale ());
424424 } else {
425- return forLocale (plugin .getConfiguration ().getString ( " language" ));
425+ return forLocale (MsgUtil . processGameLanguageCode ( plugin .getConfiguration ().getOrDefault ( "game- language", "default" ) ));
426426 }
427427 }
428428
@@ -508,14 +508,14 @@ private String postProcess(@NotNull String text) {
508508 public String forLocale (@ NotNull String locale ) {
509509 JsonConfiguration index = mapping .get (locale );
510510 if (index == null ) {
511- if (plugin .getConfiguration ().getString ( " language" ).equals (locale )) {
511+ if (MsgUtil . processGameLanguageCode ( plugin .getConfiguration ().getOrDefault ( "game- language", "default" ) ).equals (locale )) {
512512 String str = fallbackLocal ();
513513 if (str == null ) {
514514 return "Fallback Missing Language Key: " + path + ", report to QuickShop!" ;
515515 }
516516 return postProcess (str );
517517 } else {
518- return forLocale (plugin .getConfiguration ().getString ( " language" ));
518+ return forLocale (MsgUtil . processGameLanguageCode ( plugin .getConfiguration ().getOrDefault ( "game- language", "default" ) ));
519519 }
520520 } else {
521521 String str = index .getString (path );
@@ -537,7 +537,7 @@ public String forLocale() {
537537 if (sender instanceof Player ) {
538538 return forLocale (((Player ) sender ).getLocale ());
539539 } else {
540- return forLocale (plugin .getConfiguration ().getString ( " language" ));
540+ return forLocale (MsgUtil . processGameLanguageCode ( plugin .getConfiguration ().getOrDefault ( "game- language", "default" ) ));
541541 }
542542 }
543543
0 commit comments