mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +00:00
Improve description format in command list
This commit is contained in:
1 parent
d0747d6668
commit
c1f2b2bcaa
1 file changed
+7
-4
@@ -289,10 +289,13 @@ public class HuskHomesCommand extends Command implements TabProvider {
|
|||||||
.filter(command -> user.hasPermission(command.getPermission()))
|
.filter(command -> user.hasPermission(command.getPermission()))
|
||||||
.map(command -> plugin.getLocales().getRawLocale("command_list_item",
|
.map(command -> plugin.getLocales().getRawLocale("command_list_item",
|
||||||
Locales.escapeText(command.getName()),
|
Locales.escapeText(command.getName()),
|
||||||
Locales.escapeText(plugin.getLocales()
|
Locales.escapeText(
|
||||||
.truncateText(command.getDescription(), 50)),
|
plugin.getLocales().truncateText(command.getDescription(), 50)
|
||||||
Locales.escapeText(plugin.getLocales()
|
),
|
||||||
.wrapText(command.getUsage() + "\n" + command.getDescription(), 40)))
|
Locales.escapeText(String.format("%s\n\n%s",
|
||||||
|
plugin.getLocales().wrapText(command.getUsage(), 50),
|
||||||
|
plugin.getLocales().wrapText(command.getDescription(), 50)
|
||||||
|
)))
|
||||||
.orElse(command.getName()))
|
.orElse(command.getName()))
|
||||||
.collect(Collectors.toList()),
|
.collect(Collectors.toList()),
|
||||||
plugin.getLocales().getBaseList(Math.min(plugin.getSettings().getListItemsPerPage(), 6))
|
plugin.getLocales().getBaseList(Math.min(plugin.getSettings().getListItemsPerPage(), 6))
|
||||||
|
|||||||
Reference in new issue
Block a user