Requirements
Usage
Proof of Ownership
Pricing
Discord: CesarDev#6064
Twitter: @cesardev7
- Java 8 or Greater
- Spigot (1.7.x - 1.8.x)
- Support for 1.7.x - 1.8.x
- Ability to change fake ping and head texture
- Constantly updated 0.2 seconds
- Header and Footer multiples lines
- Support 1.9.x - 1.16.x
- CesarsDev
Usage
Code:
package ga.gamely.tab.example;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
import org.bukkit.entity.Player;
import com.google.common.collect.Lists;
import ga.gamely.tab.api.TabAdapter;
import ga.gamely.tab.api.TabColumn;
import ga.gamely.tab.api.TabEntry;
public class TabExampleAdapter implements TabAdapter {
@Override
public List<String> getHeader(Player player) {
return Lists.newArrayList("", "Random -> " + ThreadLocalRandom.current().nextInt(1000), "");
}
@Override
public List<String> getFooter(Player player) {
return Lists.newArrayList("", "Random -> " + ThreadLocalRandom.current().nextInt(1000), "");
}
@Override
public List<TabEntry> getEntries(Player player) {
List<TabEntry> entries = Lists.newArrayList();
for (int x = 0; x < 20; x++) {
entries.add(new TabEntry(TabColumn.LEFT, x, "(X) " + x + " (Y) " + 0));
entries.add(new TabEntry(TabColumn.MIDDLE, x, "(X) " + x + " (Y) " + 1));
entries.add(new TabEntry(TabColumn.RIGHT, x, "(X) " + x + " (Y) " + 2));
entries.add(new TabEntry(TabColumn.FAR_RIGHT, x, "(X) " + x + " (Y) " + 3));
}
return entries;
}
}
Proof of Ownership
Code:
package ga.gamely.tab;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import com.google.common.collect.Maps;
import ga.gamely.tab.api.TabAdapter;
import ga.gamely.tab.nms.TabNMS;
import lombok.Getter;
@Getter
public class Tab {
public static Optional<Tab> instance;
private Map<UUID, TabPlayer> layouts = Maps.newHashMap();
private TabNMS tabNMS;
private TabAdapter tabAdapter;
private TabUpdater tabUpdater;
public Tab(JavaPlugin plugin, TabAdapter tabAdapter) {
instance = Optional.of(this);
this.tabAdapter = tabAdapter;
Class<?> tabNMS;
try {
tabNMS = Class.forName("ga.gamely.tab.nms." + getNmsVersion() + ".Tab_" + getNmsVersion());
} catch (ClassNotFoundException e) {
tabNMS = null;
}
if (tabNMS == null) {
Bukkit.getLogger().warning("Unsupported tablist");
return;
}
try {
this.tabNMS = (TabNMS) tabNMS.getConstructors()[0].newInstance();
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException
| SecurityException e1) {
Bukkit.getLogger().warning("Failed to initialize tabNMS");
e1.printStackTrace();
}
tabUpdater = new TabUpdater(this);
plugin.getServer().getPluginManager().registerEvents(new TabListener(this), plugin);
}
public String getNmsVersion() {
return (Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3]);
}
public static Tab getInstance() {
return (instance.orElseThrow(() -> new IllegalStateException("Tab instance is null")));
}
}
Pricing
- SRC ($35 USD) with updates
- Resell rights ($47 USD)
Discord: CesarDev#6064
Twitter: @cesardev7
Last edited:
