Hey folks,
Me again! I made a API for modifying the tablist for my personal SMP server, and thought it might be useful for someone else as well!
You can find it here:
https://www.github.com/ceezuns/Poseidon
Here's the README if you want a quick look:
Poseidon
Modifying the tablist made easy!
Requirements
Main Class
Updating The Tablist
Result
Contributing
Have a cool feature that you want to add, or a bug fix? Feel free to open a pull request or an issue!
Upcoming Features
Me again! I made a API for modifying the tablist for my personal SMP server, and thought it might be useful for someone else as well!
You can find it here:
https://www.github.com/ceezuns/Poseidon
Here's the README if you want a quick look:
Poseidon
Modifying the tablist made easy!
Requirements
- Java 8 or Greater
- ProtocolLib 4.5.0
- Spigot (1.8 or Greater)
Main Class
Java:
import org.bukkit.plugin.java.JavaPlugin;
public final class PoseidonPlugin extends JavaPlugin {
private static PoseidonPlugin instance;
private Poseidon poseidon;
private PoseidonTablistTask task;
@Override
public void onEnable() {
instance = this;
this.poseidon = new Poseidon(this, 10L);
this.task = new PoseidonTablistTask();
}
@Override
public void onDisable() {
this.task.cancel();
this.poseidon = null;
instance = null;
}
public static PoseidonPlugin getInstance() {
return instance;
}
public Poseidon getPoseidon() {
return poseidon;
}
}
Updating The Tablist
Java:
import org.bukkit.scheduler.BukkitRunnable;
public final class PoseidonTablistTask extends BukkitRunnable {
public PoseidonTablistTask() {
runTaskTimerAsynchronously(Poseidon.getInstance().getPlugin(), 20L, 20L);
}
@Override
public void run() {
PoseidonPlugin.getInstance().getPoseidon().getTablistManager().getTablists().values().forEach(tablist -> {
for (int column = 0; column < 4; column++) {
for (int row = 0; row < 20; row++) {
tablist.getSlot(column, row).setText("Slot: " + column + ", " + row);
}
}
});
}
}
Result
Contributing
Have a cool feature that you want to add, or a bug fix? Feel free to open a pull request or an issue!
Upcoming Features
- Support 1.7.10.
- Add ability to change skins.
- Make tablist size configurable.
- Utility method to clear player tablist.
- Provide default tablist.
- Javadocs
- Anmol Brar (ceezuns)
- MIT
Last edited:
