An open-sourced Tablist API primarily made for 1.7x-1.8x Spigot servers. (This API can produce errors, please report them to me if you encounter any)
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency> <!-- Edge -->
<groupId>com.github.hardcorefactions</groupId>
<artifactId>Edge</artifactId>
<version>-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
/**
* Implement the TabAdapter interface
*/
public class TabLayout implements TabAdapter {
private final ExamplePlugin plugin = ExamplePlugin.getInstance();
/**
* Return your desired tab header
*/
@Override
public List<String> getHeader(Player player) {
return Arrays.asList(" ", CC.BLUE + CC.BOLD + "Edge", " ");
}
/**
* Return your desired tab footer
*/
@Override
public List<String> getFooter(Player player) {
return Arrays.asList(" ", CC.GRAY + CC.ITALIC + "lucanius.me", " ");
}
/**
* Return your desired tab entries by creating a Set of TabData
*
* new TabData(TabColumn column, int slot, String text, int latency, Skin skin)
*/
@Override
public Set<TabData> getEntries(Player player) {
Set<TabData> entries = new HashSet<>();
entries.add(new TabData(TabColumn.MIDDLE, 1, CC.BLUE + CC.BOLD + "Edge"));
entries.add(new TabData(TabColumn.MIDDLE, 2, CC.GRAY + CC.ITALIC + "lucanius.me"));
entries.add(new TabData(TabColumn.LEFT, 4, "Left"));
entries.add(new TabData(TabColumn.MIDDLE, 4, "Center"));
entries.add(new TabData(TabColumn.RIGHT, 4, "Right"));
entries.add(new TabData(TabColumn.FAR_RIGHT, 4, "Far Right"));
entries.add(new TabData(TabColumn.MIDDLE, 19, "Your Skin", plugin.getEdge().getSkin(player.getUniqueId())));
return entries;
}
}
public class ExamplePlugin extends JavaPlugin {
private static ExamplePlugin instance;
private Edge edge;
/**
* new Edge(Plugin plugin, TabAdapter adapter)
*/
@Override
public void onEnable() {
instance = this;
this.edge = new Edge(this, new TabLayout());
}
@Override
public void onDisable() {
this.edge.getService().destroy();
}
public static ExamplePlugin getInstance() {
return instance;
}
public Edge getEdge() {
return this.edge;
}
}
You can contact the dev of this tab api on discord via his tag or server:
- Lucanius discord - lucA#0999
- Lucanius server - https://discord.biove.dev/
You're free to use this for anything, including using it for your own projects. However, if you want to sell it, leave credits and a link to Luca's repository.