Fix a minor problem in language translation (#1674)

Co-authored-by: apacheZy <apachezy@hotmail.com>
This commit is contained in:
apachezy 2021-02-06 10:57:06 +08:00 committed by GitHub
parent 4e7b78832a
commit e134951e61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,9 @@ public class BentoBoxLocale {
* @return Text for this locale reference or the reference if nothing has been found
*/
public String get(String reference) {
if (config.contains(reference)) {
return config.getString(reference);
Object obj = config.get(reference);
if (obj instanceof String) {
return obj.toString();
}
return reference; // return reference in case nothing has been found
}