SonicTab is an API (Application Programming Interface) that will allow you to create customized TabList(s) easily and fastly. By offering you a simple to understand 2-Dimensional Grid system.
- 2D Grid system
- Multi-Line header and footer
- Fullscreen mode
- Cross platform
Installation of SonicTab
git clone https://github.com/rootxls/SonicTabNow you can open this folder with your IDE.
Template
First, you'll have to create a new TabList template, this will contain all your TabList properties.
private final TabListTemplate template = new TabListTemplate();Header / Footer
Secondly, you can add Header & Footer, thoses features allows you to put text on top and bottom of the tablist.
// HEADER
template.getHeader().addLines("Line 1", "Line 2");
// FOOTER
template.getFooter().addLines("Line 1", "Line 2");Body Customization
Afterwards, you can add a Body. Originally this area contains the list of players. But with SonicTab you can modify it to add whatever you want. To get this part of your template, use:
template.getBody();| Variable name | Min. value | Max. value |
|---|---|---|
| Columns | 1 | 4 |
| X | 0 | 3 |
| Y | 0 | 19 |
| lineWidth | 0 | 48 |
Such as:
Columns: Define the number of columns you want for your tablist:
template.getBody().setColumns(3);RemoveBaseLines: Removing base players:
template.getBody().setRemoveBaseLines(true);Custom Lines: Add or delete your own lines into the tablist body:
// ADD
int ping = 0;
int x, z = 0;
template.getBody().addLine(new BodyLine("YOUR LINE", ping, x, z));
// REMOVE
template.getBody().removeLine(x, z); // THE LINE AT COORDINATES X & Z WILL BE DELETED AND REPLACED BY A BLANK LINEWith lines you can modify displayed head too:
BodyLine line = new BodyLine("YOUR LINE", ping, x, z);
// TEXTURE & SIGNATURE CAN BE OPTAINED BY UPLOADING SKIN ON https://mineskin.org/
String texture = "";
String signature = "";
line.setSkin(texture, signature);From 1.8 to 1.17
Contributions are always welcome!
See contributing.md for ways to get started.
Please adhere to this project's code of conduct.
Here are the projects for which this API has been developed: