![]() |
Bukkit
1.4.7-R1.0
|
The ChatPaginator takes a raw string of arbitrary length and breaks it down into an array of strings appropriate for displaying on the Minecraft player console. More...
Classes | |
| class | ChatPage |
Static Public Member Functions | |
| static ChatPage | paginate (String unpaginatedString, int pageNumber) |
| Breaks a raw string up into pages using the default width and height. | |
| static ChatPage | paginate (String unpaginatedString, int pageNumber, int lineLength, int pageHeight) |
| Breaks a raw string up into pages using a provided width and height. | |
| static String[] | wordWrap (String rawString, int lineLength) |
| Breaks a raw string up into a series of lines. | |
Static Public Attributes | |
| static final int | GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH = 55 |
| static final int | AVERAGE_CHAT_PAGE_WIDTH = 65 |
| static final int | UNBOUNDED_PAGE_WIDTH = Integer.MAX_VALUE |
| static final int | OPEN_CHAT_PAGE_HEIGHT = 20 |
| static final int | CLOSED_CHAT_PAGE_HEIGHT = 10 |
| static final int | UNBOUNDED_PAGE_HEIGHT = Integer.MAX_VALUE |
The ChatPaginator takes a raw string of arbitrary length and breaks it down into an array of strings appropriate for displaying on the Minecraft player console.
Definition at line 12 of file ChatPaginator.java.
|
static |
Breaks a raw string up into pages using the default width and height.
| unpaginatedString | The raw string to break. |
| pageNumber | The page number to fetch. |
Definition at line 26 of file ChatPaginator.java.
References org.bukkit.util.ChatPaginator.CLOSED_CHAT_PAGE_HEIGHT, and org.bukkit.util.ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH.
Referenced by org.bukkit.command.defaults.HelpCommand.execute().
|
static |
Breaks a raw string up into pages using a provided width and height.
| unpaginatedString | The raw string to break. |
| pageNumber | The page number to fetch. |
| lineLength | The desired width of a chat line. |
| pageHeight | The desired number of lines in a page. |
Definition at line 38 of file ChatPaginator.java.
References org.bukkit.util.Java15Compat.Arrays_copyOfRange(), and org.bukkit.util.ChatPaginator.wordWrap().
|
static |
Breaks a raw string up into a series of lines.
Words are wrapped using spaces as decimeters and the newline character is respected.
| rawString | The raw string to break. |
| lineLength | The length of a line of text. |
Definition at line 58 of file ChatPaginator.java.
References org.bukkit.ChatColor.COLOR_CHAR, org.bukkit.ChatColor.getByChar(), and org.bukkit.ChatColor.WHITE.
Referenced by org.bukkit.util.ChatPaginator.paginate().
|
static |
Definition at line 14 of file ChatPaginator.java.
|
static |
Definition at line 17 of file ChatPaginator.java.
Referenced by org.bukkit.command.defaults.HelpCommand.execute(), and org.bukkit.util.ChatPaginator.paginate().
|
static |
Definition at line 13 of file ChatPaginator.java.
Referenced by org.bukkit.command.defaults.HelpCommand.execute(), org.bukkit.help.IndexHelpTopic.getFullText(), and org.bukkit.util.ChatPaginator.paginate().
|
static |
Definition at line 16 of file ChatPaginator.java.
|
static |
Definition at line 18 of file ChatPaginator.java.
Referenced by org.bukkit.command.defaults.HelpCommand.execute().
|
static |
Definition at line 15 of file ChatPaginator.java.
Referenced by org.bukkit.command.defaults.HelpCommand.execute().