Adding getTextByValue method to replace duplicate code (#823)

* Added FormattedTextValue.getTextByValue()

* changed getBoolean() and added to display_title
This commit is contained in:
replaceitem authored and GitHub committed 2021-04-20 17:14:08 -03:00
1 parent de92d47f70
commit e26e332a6d
4 files changed
+14 -34

No files matched your search

@@ -1106,7 +1106,7 @@ public class EntityValue extends Value
v = ((ListValue) v).getItems().get(0);
}
e.setCustomNameVisible(showName);
e.setCustomName(new LiteralText(v.getString()));
e.setCustomName(FormattedTextValue.getTextByValue(v));
});
put("persistence", (e, v) ->