stworz mi plugin na tab ktory wspolpracue z get clan po lewej stronie statystyki gracza po prawej przydatne komendy /helpop /sklep po srodku w dwoch kolumnach topka punktow klanu i topka rangingu graczy i ma sie zmieniac to co 30 sec na topke hajsu i wykopanych blokowa
KodariMay 10 at 9:09 am 7,740 (v2)
I’ll create a TAB plugin with clan integration, player stats, and rotating content.
RivalTab
Advanced TAB plugin integrating with GetClan API. Displays player statistics on the left, useful quick-links (/helpop, /sklep) on the right, and a rotating center section that switches every 30 seconds between clan point rankings and player rankings, then money rankings and mined blocks rankings. Fully configurable with PlaceholderAPI support and smooth animated transitions.
Let me read the TAB plugin documentation first.
Now let me plan the full structure and create all files:
Main plugin class — registers managers, starts rotation task
ClanManager — fetches clan data via GetClan API (PlaceholderAPI-based)
TabLayoutManager — builds and sends TAB layouts using TAB API
RotationManager — switches center content every 30s between clan points top / player ranking → money top / mined blocks top
Config — all messages and settings configurable
RivalTab
Advanced TAB plugin integrating with GetClan for clan statistics. Displays player stats on the left column, useful shortcuts (/helpop, /sklep) on the right, and a rotating center section switching every 30 seconds between clan point rankings and player score rankings, then money rankings and mined blocks rankings. Fully configurable via config.yml with PlaceholderAPI support for all displayed values.
The plugin is complete. Here’s a summary of what was built:
Structure
RivalTab — main plugin class, initializes LayoutManager and RotationManager
LayoutManager — builds TAB layouts using the TAB API Layout system (80 slots split into left/center/right columns), listens for TabLoadEvent and PlayerLoadEvent to apply layouts automatically
RotationManager — runs a repeating task every 30 seconds (configurable) that flips currentPhase between 0 and 1, then triggers a full layout rebuild for all online players
Layout columns (slot mapping)
Column
Slots
Content
Left
1–20
Player stats (health, kills, deaths, K/D, money, clan info)
Center
21–60
Rotating
— Phase 1: Top Klanów + Top Graczy / Phase 2: Top Bogaczy + Top Górników
Right
61–80
Quick commands (/helpop, /sklep, etc.) + server info
Placeholders used
%getclan_*% — GetClan plugin placeholders for clan data and rankings
%player_*%, %server_*% — standard PlaceholderAPI placeholders
All lines are fully configurable in config.yml — just swap placeholder names to match your exact GetClan/economy plugin placeholder identifiers.
jak klikam tab nie pokazuje sie
KodariMay 10 at 9:15 am 10,302 (v2)
Let me read all the files first to understand what was built.
Teraz czytam dokumentację TAB API żeby zrozumieć jak poprawnie używać Layout API.
Teraz widzę problem. Kilka krytycznych błędów:
createNewLayout tworzy nowy layout za każdym razem — TAB nie pozwala na duplikaty nazw, trzeba reużywać lub usuwać stary
Layout musi być włączony w TAB config — ale główny problem to że LayoutManager w TAB musi mieć włączoną funkcję layout w config.yml TABa
addFixedSlot z samym tekstem — TAB renderuje sloty jako fake graczy, tekst musi być ustawiony przez TabListFormatManager lub przez właściwy slot API
Brak addGroup — bez grupy dla prawdziwych graczy, TAB nie wie gdzie ich umieścić i może nie pokazywać layoutu
Przepiszę LayoutManager poprawnie — tworzę layout raz, reużywam go, i dodaję grupę dla graczy:
Teraz zaktualizuj config.yml — center ma teraz tylko 20 slotów (21-40), nie 40:
Teraz najważniejsza rzecz — musisz włączyć Layout w TAB. W pliku plugins/TAB/config.yml znajdź i ustaw:
YAML
layout:
enabled: true
Co było nie tak i co naprawiłem
Główne błędy:
createNewLayout za każdym razem — TAB rzucał błąd przy duplikacie nazwy layoutu i nie wysyłał niczego. Teraz layouty są tworzone raz (buildLayouts()) i reużywane przy każdym sendLayout.
Brak addGroup(null, PLAYER_SLOTS) — bez tego TAB nie wiedział gdzie umieścić prawdziwych graczy i mógł odrzucić cały layout. Teraz gracze zajmują sloty 41–60.
Zła liczba slotów center — center miało 40 slotów (21–60) ale gracze też tam siedzieli. Teraz: left=1–20, center=21–40, players=41–60, right=61–80.
Brak opóźnienia przy starcie — plugin próbował wysłać layout zanim TAB skończył się ładować. Teraz jest runTaskLater(..., 40L) (2 sekundy).
Wymaganie: W plugins/TAB/config.yml musi być layout: enabled: true — bez tego getLayoutManager() zwraca null i nic nie działa.
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
6 340
src/main/java/com/rivaltab/RivalTab.java
package com.rivaltab;
import com.rivaltab.manager.LayoutManager;
import com.rivaltab.manager.RotationManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;
public class RivalTab extends JavaPlugin {
@Getter
private static RivalTab instance;
@Getter
private LayoutManager layoutManager;
@Getter
private RotationManager rotationManager;
@Override
public void onEnable() {
instance = this;
saveDefaultConfig();
this.layoutManager = new LayoutManager(this);
this.rotationManager = new RotationManager(this);
// Build layouts after TAB has had time to fully initialize
getServer().getScheduler().runTaskLater(this, () -> {
layoutManager.buildLayouts();
layoutManager.sendToAll();
}, 40L);
rotationManager.start();
getLogger().info("RivalTab enabled successfully.");
}
@Override
public void onDisable() {
if (rotationManager != null) {
rotationManager.stop();
}
getLogger().info("RivalTab disabled.");
}
}