Skip to content

Add Text Paginator API #547

@zml2008

Description

@zml2008

API for formatted pagination of chat text
This allows long messages to be sent in a broken-up, user-friendly manner

Potential usage example:

API-side

public void sendPaginated(CommandSource source, Text... lines) {
    PaginationService service = game.getServicesManager().provideUnchecked(PaginationService.class);
    service.send(source, msgs);
}

User-side:

line 1
line2
line3
Previous Page        Next Page

Where previous and next page are clickable (for non-click supporting clients, commands will exist)
Commands:

  • /paginator next and /paginator prev will send next or previous pages of a player's current pagination
  • /paginator <uuid> next and /paginator <uuid> prev will send next or previous pages of a given paginaton -- this will mostly be used by quoted text

These commands will have no assigned permission because they only have meaning when triggered by other plugins, which are expected to do and appropriate permissions checking for data

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions