mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Build with Java 16 for the time being
This commit is contained in:
1 parent
1c7d45bb81
commit
bb66246fb6
7 files changed
+13
-13
No files matched your search
@@ -146,9 +146,11 @@ public class Cache {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public MineDown getCommandList(@NotNull Locales locales, @NotNull List<CommandBase> commands,
|
||||
final int itemsPerPage, final int page) {
|
||||
return PaginatedList.of(commands.stream().map(command -> locales.getRawLocale("command_list_item",
|
||||
public MineDown getCommandList(@NotNull OnlineUser onlineUser, @NotNull Locales locales,
|
||||
@NotNull List<CommandBase> commands, final int itemsPerPage, final int page) {
|
||||
return PaginatedList.of(commands.stream()
|
||||
.filter(command -> onlineUser.hasPermission(command.permission))
|
||||
.map(command -> locales.getRawLocale("command_list_item",
|
||||
Locales.escapeMineDown(command.command),
|
||||
Locales.escapeMineDown(command.getDescription().length() > 50
|
||||
? command.getDescription().substring(0, 49).trim() + "…"
|
||||
|
||||
Reference in new issue
Block a user