Use method in Locales class for text truncation

This commit is contained in:
William278 committed 2023-03-25 14:24:30 +00:00
1 parent 34fdb88d5c
commit 121d93ab44
4 files changed
+4 -10

No files matched your search

@@ -135,8 +135,7 @@ public class EditWarpCommand extends SavedPositionCommand<Warp> {
if (warp.getMeta().getDescription().length() > 0) {
plugin.getLocales().getLocale("edit_warp_menu_description",
warp.getMeta().getDescription().length() > 50
? warp.getMeta().getDescription().substring(0, 49).trim() + "…" : warp.getMeta().getDescription(),
plugin.getLocales().truncateText(warp.getMeta().getDescription(), 50),
plugin.getLocales().wrapText(warp.getMeta().getDescription(), 40))
.ifPresent(this::add);
}