zack a

TABLIST LITE — ULTIMATE TABLIST SYSTEM

PREMIUM EDITION | ENTERPRISE DEVELOPMENT

Minecraft 1.21.1+

---

1. ROL DEL DESARROLLADOR

Actúa como un equipo de desarrolladores Senior especializados en:

  • Java 21+
  • Minecraft Paper / Spigot.
  • Desarrollo de plugins profesionales.
  • Sistemas avanzados de TabList.
  • Packet manipulation cuando sea necesario.
  • Animaciones dinámicas.
  • Scoreboard y PlayerList.
  • MiniMessage.
  • Sistemas de placeholders.
  • Optimización de servidores.
  • Interfaces visuales de Minecraft.

Tu misión es desarrollar TABLIST LITE, un plugin de TabList extremadamente profesional, moderno, elegante, animado y completamente configurable.

El plugin debe ofrecer una experiencia visual premium, similar a los servidores comerciales más grandes de Minecraft.

NO quiero una TabList básica.

Quiero un sistema completo que permita personalizar absolutamente todos los elementos visuales mediante archivos YAML.

---

2. IDENTIDAD DEL PLUGIN

Nombre: TabListLite

Nombre del archivo final:

TabListLite.jar

Versión inicial: 1.0.0

Lenguaje: Java 21+

Compatibilidad:

  • Minecraft 1.21.1
  • Minecraft 1.21.2
  • Minecraft 1.21.3
  • Minecraft 1.21.4
  • Minecraft 1.21.5+
  • Versiones posteriores compatibles.

Plataformas:

  • Paper
  • Spigot cuando sea compatible.

El plugin debe funcionar independientemente.

No necesitar otros plugins obligatorios.

---

3. SISTEMA DE TABLIST PREMIUM

Crear una TabList completamente personalizable.

La TabList debe actualizarse dinámicamente y mostrar información en tiempo real.

Debe incluir:

  • Header animado.
  • Footer animado.
  • Nombre del servidor.
  • Nombre del jugador.
  • Rango del jugador.
  • Fecha actual.
  • Hora actual.
  • Dirección IP del servidor.
  • Puerto del servidor.
  • Jugadores conectados.
  • Máximo de jugadores.
  • Ping del jugador.
  • TPS del servidor.
  • Uso de memoria RAM.
  • Discord.
  • Sitio web.
  • Tienda del servidor.
  • Información adicional personalizable.

Todos los elementos deben poder activarse, desactivarse y editarse mediante YAML.

---

4. HEADER ANIMADO

Crear un encabezado profesional con animaciones.

Ejemplo:

╔══════════════════════════════════╗ ✦ NEXUS NETWORK ✦ THE BEST MINECRAFT EXPERIENCE ╚══════════════════════════════════╝

Animaciones disponibles:

  • Texto RGB.
  • Gradientes animados.
  • Efecto Rainbow.
  • Efecto Wave.
  • Efecto Typewriter.
  • Efecto Fade.
  • Efecto Glow simulado mediante colores.
  • Animación de desplazamiento.
  • Animación de colores.
  • Texto parpadeante configurable.
  • Frames personalizados.

Permitir definir múltiples frames.

Ejemplo:

Frame 1: <gradient:#00E5FF:#7C4DFF>NEXUS NETWORK</gradient>

Frame 2: <gradient:#7C4DFF:#FF00CC>NEXUS NETWORK</gradient>

Frame 3: <gradient:#FF00CC:#00E5FF>NEXUS NETWORK</gradient>

Las animaciones deben ser fluidas y configurables.

No generar parpadeos molestos.

---

5. INFORMACIÓN DEL JUGADOR

Crear un sistema dinámico de información.

Mostrar:

  • Nombre del jugador.
  • Nombre de usuario.
  • Display Name.
  • UUID opcional.
  • Rango.
  • Prefijo.
  • Sufijo.
  • Ping.
  • Mundo actual.
  • Coordenadas opcionales.
  • Tiempo conectado.
  • Fecha de ingreso.
  • Estado de autenticación opcional.

Ejemplo:

PLAYER INFORMATION

Nombre: %player_name% Rango: %rank% Ping: %player_ping% Mundo: %player_world% Tiempo conectado: %session_time%

Todos los datos deben actualizarse automáticamente.

---

6. SISTEMA DE RANGOS

Crear un sistema de rangos visuales.

Ejemplos:

OWNER ADMIN MODERATOR HELPER YOUTUBER VIP MVP DEFAULT

Cada rango debe tener:

  • Nombre personalizado.
  • Prefijo.
  • Sufijo.
  • Color.
  • Prioridad.
  • Formato de nombre.
  • Permisos de visualización.
  • Orden de aparición.

Ejemplo:

OWNER: prefix: "<gradient:#FF0000:#FF7700>[OWNER]</gradient>" color: "#FF5555" priority: 100

ADMIN: prefix: "<gradient:#FF00CC:#9900FF>[ADMIN]</gradient>" color: "#FF55FF" priority: 90

VIP: prefix: "<gradient:#FFD700:#FFAA00>[VIP]</gradient>" color: "#FFD700" priority: 50

DEFAULT: prefix: "<gray>[PLAYER]</gray>" color: "#AAAAAA" priority: 1

Permitir asignación mediante permisos.

No depender obligatoriamente de LuckPerms.

Implementar un sistema interno de rangos con opción de integración externa.

---

7. SISTEMA DE FOOTER

Crear un footer animado y profesional.

Ejemplo:

━━━━━━━━━━━━━━━━━━━━━━━━━━

DISCORD: discord.gg/tuserver

WEB: www.tuserver.com

TIENDA: store.tuserver.com

PLAY.TUSERVER.NET

━━━━━━━━━━━━━━━━━━━━━━━━━━

Características:

  • Múltiples líneas.
  • Gradientes.
  • RGB.
  • Animaciones.
  • Placeholders.
  • Información dinámica.
  • Separadores configurables.
  • Frames animados.
  • Actualización independiente del Header.

---

8. INFORMACIÓN DEL SERVIDOR

Mostrar información en tiempo real.

Datos:

  • Nombre del servidor.
  • IP del servidor.
  • Puerto.
  • Jugadores conectados.
  • Jugadores máximos.
  • TPS.
  • MSPT.
  • Uso de memoria.
  • Memoria máxima.
  • Versión de Minecraft.
  • Estado del servidor.
  • Mundo principal.
  • Tiempo de actividad.

Ejemplo:

SERVER STATUS

Servidor: Nexus Network IP: play.nexus.net Puerto: 25565

Jugadores: 124/500 TPS: 20.0 MSPT: 12.5

RAM: 2048 MB / 8192 MB Versión: 1.21.4

Los valores deben ser reales y no simulados.

Si un dato no está disponible, mostrar un valor configurable o desactivar ese indicador.

---

9. SISTEMA DE FECHA Y HORA

Crear un sistema de fecha y hora completamente configurable.

Mostrar:

  • Día.
  • Mes.
  • Año.
  • Hora.
  • Minutos.
  • Segundos.
  • Zona horaria.
  • Formato de fecha.

Ejemplos:

12/11/2026 12 Noviembre 2026 Jueves, 12 de noviembre 14:35:22

Permitir configurar:

  • Español.
  • Inglés.
  • Formatos personalizados.
  • Zona horaria.
  • Actualización automática.

---

10. SISTEMA DISCORD Y REDES SOCIALES

Integrar información de redes sociales.

Configuración:

Discord: enabled: true url: "https://discord.gg/tuserver" text: "discord.gg/tuserver"

Website: enabled: true url: "https://tuserver.com" text: "www.tuserver.com"

Store: enabled: true url: "https://store.tuserver.com" text: "store.tuserver.com"

Twitter: enabled: false url: ""

YouTube: enabled: true url: ""

TikTok: enabled: false url: ""

Mostrar toda esta información en la TabList.

---

11. SISTEMA DE ANIMACIONES AVANZADAS

Crear un motor de animaciones propio.

Tipos:

  • RGB.
  • Rainbow.
  • Gradient.
  • Wave.
  • Typewriter.
  • Fade In.
  • Fade Out.
  • Scrolling Text.
  • Pulse.
  • Color Cycle.
  • Static.
  • Custom Frames.

Características:

  • Velocidad configurable.
  • Intervalo configurable.
  • Dirección configurable.
  • Colores personalizados.
  • Frames independientes.
  • Animaciones simultáneas.
  • Animaciones por rango.
  • Animaciones por mundo.
  • Animaciones por servidor.
  • Animaciones por horario.

Todas las animaciones deben ser editables mediante YAML.

---

12. SISTEMA DE PLACEHOLDERS

Crear un sistema interno de placeholders.

Placeholders básicos:

%player_name% %player_displayname% %player_uuid% %player_ping% %player_world% %player_x% %player_y% %player_z% %player_gamemode% %player_health% %player_food% %player_level% %player_exp% %player_online_time%

Placeholders de rango:

%rank% %rank_prefix% %rank_suffix%

Placeholders del servidor:

%server_name% %server_ip% %server_port% %server_online% %server_max_players% %server_tps% %server_mspt% %server_ram_used% %server_ram_max% %server_version% %server_uptime%

Placeholders de fecha:

%date% %time% %day% %month% %year% %weekday%

Placeholders sociales:

%discord% %website% %store%

Implementar también compatibilidad opcional con PlaceholderAPI.

El plugin no debe necesitar PlaceholderAPI para funcionar.

---

13. SISTEMA DE TABLIST POR RANGOS

Permitir diferentes diseños de TabList según el rango.

Ejemplo:

OWNER: header: "OWNER HEADER" footer: "OWNER FOOTER"

ADMIN: header: "ADMIN HEADER" footer: "ADMIN FOOTER"

VIP: header: "VIP HEADER" footer: "VIP FOOTER"

DEFAULT: header: "DEFAULT HEADER" footer: "DEFAULT FOOTER"

También permitir:

  • TabList por mundo.
  • TabList por permiso.
  • TabList por servidor.
  • TabList por evento.
  • TabList por temporada.

Establecer prioridades para evitar conflictos.

---

14. SISTEMA DE ORDENAMIENTO DE JUGADORES

Crear un sistema de ordenamiento profesional.

Opciones:

  • Por rango.
  • Por prioridad.
  • Alfabéticamente.
  • Por ping.
  • Por tiempo conectado.
  • Por grupo.
  • Orden personalizado.

Ejemplo:

OWNER ADMIN MODERATOR HELPER YOUTUBER MVP VIP DEFAULT

Los jugadores deben visualizarse correctamente según su prioridad.

Evitar duplicaciones y problemas de ordenamiento.

---

15. SISTEMA DE SCOREBOARD OPCIONAL

Crear un scoreboard adicional completamente opcional.

Ejemplo:

╔══════════════════╗ NEXUS NETWORK ╚══════════════════╝

Jugador: %player_name%

Rango: %rank%

━━━━━━━━━━━━━━━━━━

Online: %server_online% Ping: %player_ping% TPS: %server_tps%

━━━━━━━━━━━━━━━━━━

Discord: discord.gg/tuserver

Configurable mediante YAML.

IMPORTANTE:

La función de Scoreboard debe poder desactivarse independientemente de la TabList.

---

16. SISTEMA DE CONFIGURACIÓN YAML

Crear todos los archivos YAML necesarios.

Estructura:

TabListLite/ │ ├── config.yml ├── messages.yml ├── header.yml ├── footer.yml ├── animations.yml ├── ranks.yml ├── placeholders.yml ├── scoreboard.yml ├── sorting.yml ├── integrations.yml └── worlds.yml

Cada archivo debe tener valores de ejemplo profesionales y completamente funcionales.

No entregar archivos vacíos.

---

17. CONFIG.YML PRINCIPAL

Ejemplo:

plugin: language: es debug: false

tablist: enabled: true

update-interval: 20

header: enabled: true

footer: enabled: true

animations: enabled: true

sorting: enabled: true

player-format: enabled: true

scoreboard: enabled: false

performance: async-placeholders: true cache-enabled: true cache-duration: 1000

integrations: placeholderapi: true luckperms: true

social: discord: "https://discord.gg/tuserver" website: "https://tuserver.com" store: "https://store.tuserver.com"

---

18. HEADER.YML

Ejemplo:

header: enabled: true

frames: - "<gradient:#00E5FF:#7C4DFF>✦ NEXUS NETWORK ✦</gradient>" - "<gradient:#7C4DFF:#FF00CC>✦ NEXUS NETWORK ✦</gradient>" - "<gradient:#FF00CC:#00E5FF>✦ NEXUS NETWORK ✦</gradient>"

lines: - "" - "%animation:server_title%" - "<gray>The ultimate Minecraft experience</gray>" - "" - "<white>Welcome, <gradient:#00E5FF:#7C4DFF>%player_name%</gradient></white>" - ""

animation: enabled: true interval: 5 mode: FRAME

---

19. FOOTER.YML

Ejemplo:

footer: enabled: true

lines: - "" - "<gradient:#00E5FF:#7C4DFF>SERVER INFORMATION</gradient>" - "<gray>Players: <white>%server_online%/%server_max_players%</white></gray>" - "<gray>Your ping: <white>%player_ping%ms</white></gray>" - "<gray>Server TPS: <white>%server_tps%</white></gray>" - "" - "<gradient:#5865F2:#00AAFF>DISCORD</gradient> <white>discord.gg/tuserver</white>" - "<gradient:#00E5FF:#7C4DFF>PLAY.TUSERVER.NET</gradient>" - ""

animation: enabled: true interval: 10

---

20. COMANDOS

Crear los comandos:

/tablist /tablist reload /tablist help /tablist info /tablist preview /tablist animations /tablist setrank <jugador> <rango> /tablist reset <jugador> /tablist toggle /tablist debug

Permisos:

tablistlite.admin tablistlite.reload tablistlite.preview tablistlite.bypass tablistlite.animations

Todos los comandos deben funcionar correctamente.

---

21. SISTEMA DE RECARGA

El comando:

/tablist reload

Debe recargar:

  • config.yml
  • header.yml
  • footer.yml
  • animations.yml
  • ranks.yml
  • placeholders.yml
  • scoreboard.yml
  • sorting.yml
  • integrations.yml
  • worlds.yml

La recarga debe:

  • Validar YAML.
  • Detectar errores.
  • Mostrar advertencias.
  • Actualizar animaciones.
  • Actualizar jugadores conectados.
  • No duplicar tareas.
  • No requerir reiniciar el servidor.

Si existe un error en un archivo, conservar la última configuración válida cuando sea posible.

---

22. SISTEMA DE RENDIMIENTO

Optimizar para servidores grandes.

Requisitos:

  • Actualizaciones inteligentes.
  • Caché de placeholders.
  • Evitar cálculos innecesarios.
  • No crear tareas individuales innecesarias.
  • Evitar consultas repetidas.
  • Procesamiento seguro.
  • Evitar bloqueos del hilo principal.
  • Liberar recursos al desconectar jugadores.
  • Cancelar tareas al apagar el plugin.

No actualizar información estática constantemente.

Permitir intervalos independientes para:

  • Header.
  • Footer.
  • Animaciones.
  • Estadísticas.
  • Información del jugador.

---

23. SISTEMA DE API

Crear una API pública.

Ejemplos:

TabListLiteAPI.reload() TabListLiteAPI.updatePlayer(player) TabListLiteAPI.setPlayerRank(player, rank) TabListLiteAPI.getPlayerRank(player) TabListLiteAPI.setHeader(player, header) TabListLiteAPI.setFooter(player, footer) TabListLiteAPI.refreshAll()

Implementar eventos:

  • TabListLoadEvent.
  • TabListUpdateEvent.
  • PlayerRankChangeEvent.
  • AnimationChangeEvent.

---

24. ESTRUCTURA DEL PROYECTO

Crear una estructura profesional:

TabListLite/ │ ├── src/main/java/ │ └── com/tablistlite/ │ │ │ ├── TabListLite.java │ │ │ ├── commands/ │ ├── configuration/ │ ├── animations/ │ ├── placeholders/ │ ├── tablist/ │ ├── scoreboard/ │ ├── ranks/ │ ├── sorting/ │ ├── listeners/ │ ├── integrations/ │ ├── api/ │ ├── scheduler/ │ └── utilities/ │ ├── src/main/resources/ │ ├── plugin.yml │ ├── config.yml │ ├── messages.yml │ ├── header.yml │ ├── footer.yml │ ├── animations.yml │ ├── ranks.yml │ ├── placeholders.yml │ ├── scoreboard.yml │ ├── sorting.yml │ ├── integrations.yml │ └── worlds.yml │ ├── pom.xml └── README.md

---

25. PRUEBAS OBLIGATORIAS

Probar:

  1. Inicio del servidor.
  2. Generación de archivos YAML.
  3. Carga de configuración.
  4. Header.
  5. Footer.
  6. Animaciones.
  7. Gradientes.
  8. RGB.
  9. Placeholders.
  10. Información del jugador.
  11. Fecha y hora.
  12. Rangos.
  13. Ordenamiento.
  14. Discord.
  15. IP del servidor.
  16. TPS.
  17. RAM.
  18. Scoreboard.
  19. Recarga de configuración.
  20. Conexión de múltiples jugadores.
  21. Desconexiones.
  22. Rendimiento.
  23. Reinicio del servidor.

No entregar características simuladas.

---

26. DISEÑO Y EXPERIENCIA VISUAL

El resultado debe tener una estética:

  • Premium.
  • Moderna.
  • Minimalista.
  • Elegante.
  • Profesional.
  • Limpia.
  • Futurista.

Utilizar combinaciones de colores:

  • Azul eléctrico.
  • Cyan.
  • Púrpura.
  • Blanco.
  • Gris oscuro.
  • Gradientes RGB.

Evitar exceso de colores y símbolos.

La información debe estar organizada.

La TabList debe verse profesional tanto en resoluciones pequeñas como grandes.

---

27. ENTREGA FINAL

Entregar:

  1. Proyecto completo.
  2. Código fuente Java.
  3. Todos los archivos YAML.
  4. pom.xml.
  5. plugin.yml.
  6. README.md.
  7. Configuraciones listas para utilizar.
  8. Animaciones previamente configuradas.
  9. Rangos de ejemplo.
  10. Placeholders funcionales.
  11. Plugin compilado.

Nombre obligatorio del archivo:

TabListLite.jar

Ubicación de instalación:

/plugins/TabListLite.jar

Al iniciar el servidor debe generar automáticamente todos los archivos YAML con configuraciones completas.

El plugin debe funcionar inmediatamente después de instalarlo.

---

28. REGLAS FINALES DE DESARROLLO

NO entregar pseudocódigo.

NO entregar ejemplos incompletos.

NO dejar clases vacías.

NO dejar métodos sin implementar.

NO simular información del servidor.

NO crear animaciones que no funcionen.

NO depender de otros plugins obligatorios.

NO utilizar APIs incompatibles con Minecraft 1.21.1.

NO duplicar tareas de actualización.

NO generar errores en consola.

NO sobrescribir configuraciones personalizadas.

NO sacrificar rendimiento por animaciones.

Toda funcionalidad debe estar conectada, implementada y probada.

Si el desarrollo es demasiado grande, dividirlo en módulos manteniendo la arquitectura.

OBJETIVO FINAL

Crear TABLIST LITE como un plugin comercial premium para servidores Minecraft.

Una TabList con animaciones profesionales, información en tiempo real, rangos personalizados, Discord, IP, fecha, hora, estadísticas, placeholders, Scoreboard opcional y configuraciones YAML completas.

El resultado final debe ser un archivo:

TabListLite.jar

Listo para instalar, configurar y utilizar.

Crea el mejor plug-in de tablist profesional pulido y animado

Kodari AI
KodariNov 13 at 4:31 am 5
TabListLite
Premium animated tablist plugin for Minecraft 1.21.1+ with dynamic headers/footers, RGB gradients, custom animations, rank systems, placeholder engine, player sorting, optional scoreboard, and full YAML configuration. Features real-time server stats (TPS, RAM, player count), date/time display, social media links, per-rank tablist designs, and PlaceholderAPI/LuckPerms optional integrations. Includes complete command system with reload support, public API with events, and performance optimizations with caching and async placeholder processing.

Creé la base de TabListLite para Paper 1.21.1+, con configuraciones YAML, rangos, animaciones, PlaceholderAPI opcional, ordenamiento y scoreboard opcional.

La entrega no cubre todavía toda la especificación: faltan varios efectos de animación, integraciones y criterios de diseño. Tampoco se ha probado en un servidor ni se ha verificado la compatibilidad con Spigot.

Para obtener TabListLite.jar, pulsa Compile en la barra superior y después Compile en la ventana. Si la compilación tiene éxito, pulsa Download.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
21 475
src/main/java/com/tablistlite/TabListLite.java
package com.tablistlite;

import com.tablistlite.api.TabListLoadEvent;
import com.tablistlite.api.TabListUpdateEvent;
import com.tablistlite.api.PlayerRankChangeEvent;
import com.tablistlite.api.AnimationChangeEvent;
import me.clip.placeholderapi.PlaceholderAPI;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.Team;

import java.io.File;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class TabListLite extends JavaPlugin implements Listener {
    private static final String[] FILES = {"config", "messages", "header", "footer", "animations", "ranks", "placeholders", "scoreboard", "sorting", "integrations", "worlds", "assignments"};
    private static final Pattern ANIMATION = Pattern.compile("%animation:([a-zA-Z0-9_-]+)%");
    private final MiniMessage mini = MiniMessage.miniMessage();
    private Map<String, YamlConfiguration> files = new HashMap<>();
    private final Map<UUID, Long> joined = new HashMap<>();
    private final Set<UUID> disabled = new HashSet<>();
    private final Map<UUID, Component> headers = new HashMap<>(), footers = new HashMap<>();
    private final Map<UUID, Scoreboard> previousBoards = new HashMap<>(), ownBoards = new HashMap<>();
    private final Map<UUID, String> boardStates = new HashMap<>();
    private final Map<String, Integer> animationFrames = new HashMap<>();
    private BukkitTask task;
    private long ticks;

    @Override public void onEnable() {
        for (String name : FILES) saveResource(name + ".yml", false);
        if (!reloadFiles()) { getServer().getPluginManager().disablePlugin(this); return; }
        getServer().getPluginManager().registerEvents(this, this);
        Objects.requireNonNull(getCommand("tablist")).setExecutor(this::command);
        for (Player p : Bukkit.getOnlinePlayers()) joined.put(p.getUniqueId(), System.currentTimeMillis());
        startTask();
        Bukkit.getPluginManager().callEvent(new TabListLoadEvent());
    }

    @Override public void onDisable() {
        if (task != null) task.cancel();
        for (Player p : Bukkit.getOnlinePlayers()) clear(p);
    }

    public boolean reloadFiles() {
        Map<String, YamlConfiguration> next = new HashMap<>();
        try {
            for (String name : FILES) {
                YamlConfiguration yaml = new YamlConfiguration();
                yaml.load(new File(getDataFolder(), name + ".yml"));
                next.put(name, yaml);
            }
            ZoneId.of(next.get("config").getString("date.timezone", "UTC"));
            DateTimeFormatter.ofPattern(next.get("config").getString("date.date-format", "dd/MM/yyyy"));
            DateTimeFormatter.ofPattern(next.get("config").getString("date.time-format", "HH:mm:ss"));
            if (!next.get("ranks").isConfigurationSection("ranks.DEFAULT")) throw new IllegalArgumentException("ranks.DEFAULT is required");
        } catch (Exception e) {
            getLogger().severe("Error al cargar YAML: " + e.getMessage());
            return false;
        }
        files = next;
        animationFrames.clear();
        boardStates.clear();
        return true;
    }

    private void startTask() {
        if (task != null) task.cancel();
        task = Bukkit.getScheduler().runTaskTimer(this, () -> {
            ticks++;
            int interval = Math.max(1, cfg("config").getInt("tablist.update-interval", 20));
            int h = Math.max(1, cfg("header").getInt("interval", 5));
            int f = Math.max(1, cfg("footer").getInt("interval", 20));
            if (ticks % h == 0 || ticks % f == 0 || ticks % interval == 0) {
                for (Player p : Bukkit.getOnlinePlayers()) update(p, ticks % h == 0, ticks % f == 0, ticks % interval == 0);
            }
        }, 1L, 1L);
    }

    private YamlConfiguration cfg(String name) { return files.get(name); }
    @EventHandler public void join(PlayerJoinEvent e) { joined.put(e.getPlayer().getUniqueId(), System.currentTimeMillis()); Bukkit.getScheduler().runTask(this, this::refreshAll); }
    @EventHandler public void quit(PlayerQuitEvent e) {
        UUID id = e.getPlayer().getUniqueId();
        joined.remove(id); disabled.remove(id); headers.remove(id); footers.remove(id); previousBoards.remove(id); ownBoards.remove(id); boardStates.remove(id);
        Bukkit.getScheduler().runTask(this, this::refreshAll);
    }

    public void refreshAll() { for (Player p : Bukkit.getOnlinePlayers()) updatePlayer(p); }
    public void updatePlayer(Player p) { update(p, true, true, true); }
    private void update(Player p, boolean header, boolean footer, boolean details) {
        if (!cfg("config").getBoolean("tablist.enabled", true) || disabled.contains(p.getUniqueId()) || p.hasPermission("tablistlite.bypass")) { clear(p); return; }
        String rank = getPlayerRank(p);
        ConfigurationSection layout = layout(p, rank);
        if (header || footer) {
            Component h = headers.get(p.getUniqueId()), f = footers.get(p.getUniqueId());
            if (h == null) h = cfg("header").getBoolean("enabled", true) ? renderLines(p, rank, lines(layout, "header", cfg("header").getStringList("lines"))) : Component.empty();
            if (f == null) f = cfg("footer").getBoolean("enabled", true) ? renderLines(p, rank, lines(layout, "footer", cfg("footer").getStringList("lines"))) : Component.empty();
            p.sendPlayerListHeaderAndFooter(h, f);
        }
        if (details) {
            if (cfg("config").getBoolean("tablist.player-format", true)) p.playerListName(render(p, rank, rankSection(rank).getString("format", "%rank_prefix%%player_name%%rank_suffix%")));
            updateBoard(p);
        }
        Bukkit.getPluginManager().callEvent(new TabListUpdateEvent(p));
    }

    private List<String> lines(ConfigurationSection layout, String key, List<String> fallback) {
        return layout != null && layout.isList(key) ? layout.getStringList(key) : fallback;
    }
    private ConfigurationSection layout(Player p, String rank) {
        ConfigurationSection root = cfg("worlds").getConfigurationSection("layouts");
        if (root == null) return null;
        return root.getKeys(false).stream().map(root::getConfigurationSection).filter(Objects::nonNull)
                .filter(s -> (!s.contains("world") || p.getWorld().getName().equalsIgnoreCase(s.getString("world"))) && (!s.contains("rank") || rank.equalsIgnoreCase(s.getString("rank"))) && (!s.contains("permission") || p.hasPermission(Objects.requireNonNull(s.getString("permission")))))
                .max(Comparator.comparingInt(s -> s.getInt("priority"))).orElse(null);
    }
    private Component renderLines(Player p, String rank, List<String> lines) { return render(p, rank, String.join("\n", lines)); }
    private Component render(Player p, String rank, String text) {
        String result = placeholders(p, rank, animations(text));
        try { return mini.deserialize(result); } catch (RuntimeException ex) { return Component.text(result); }
    }
    private String animations(String text) {
        Matcher m = ANIMATION.matcher(text); StringBuffer out = new StringBuffer();
        while (m.find()) {
            ConfigurationSection s = cfg("animations").getConfigurationSection("animations." + m.group(1));
            String value = "";
            if (s != null) {
                long frame = cfg("animations").getBoolean("enabled", true) ? ticks / Math.max(1, s.getInt("interval", 5)) : 0;
                String source = s.getString("text", "");
                switch (s.getString("type", "frames").toLowerCase(Locale.ROOT)) {
                    case "frames" -> { List<String> list = s.getStringList("frames"); if (!list.isEmpty()) { int index = (int)(frame % list.size()); value = list.get(index); Integer old = animationFrames.put(m.group(1), index); if (old == null || old != index) Bukkit.getPluginManager().callEvent(new AnimationChangeEvent(m.group(1), index)); } }
                    case "rainbow" -> value = "<rainbow:" + (frame % 360) + ">" + mini.escapeTags(source) + "</rainbow>";
                    case "typewriter" -> { int n = source.codePointCount(0, source.length()); value = mini.escapeTags(source.substring(0, source.offsetByCodePoints(0, (int)(frame % (n + 1))))); }
                    case "scroll" -> { if (!source.isEmpty()) { int n = source.codePointCount(0, source.length()), width = Math.max(1, Math.min(100, s.getInt("width", 10))); int[] points = source.codePoints().toArray(); StringBuilder b = new StringBuilder(); for (int i = 0; i < width; i++) b.appendCodePoint(points[(int)((frame + i) % n)]); value = mini.escapeTags(b.toString()); } }
                    default -> value = source;
                }
            }
            m.appendReplacement(out, Matcher.quoteReplacement(value));
        }
        m.appendTail(out); return out.toString();
    }

    private String placeholders(Player p, String rank, String text) {
        ConfigurationSection r = rankSection(rank); ZonedDateTime now = ZonedDateTime.now(ZoneId.of(cfg("config").getString("date.timezone", "UTC")));
        Locale locale = Locale.forLanguageTag(cfg("config").getString("date.locale", "es-ES"));
        long seconds = Math.max(0, (System.currentTimeMillis() - joined.getOrDefault(p.getUniqueId(), System.currentTimeMillis())) / 1000);
        Runtime rt = Runtime.getRuntime(); String unavailable = cfg("placeholders").getString("unavailable", "N/A");
        Map<String, String> values = new LinkedHashMap<>();
        values.put("player_name", mini.escapeTags(p.getName())); values.put("player_displayname", mini.escapeTags(p.getDisplayName())); values.put("player_uuid", p.getUniqueId().toString());
        values.put("player_ping", String.valueOf(p.getPing())); values.put("player_world", mini.escapeTags(p.getWorld().getName()));
        values.put("player_x", String.valueOf(p.getLocation().getBlockX())); values.put("player_y", String.valueOf(p.getLocation().getBlockY())); values.put("player_z", String.valueOf(p.getLocation().getBlockZ()));
        values.put("player_gamemode", p.getGameMode().name()); values.put("player_health", String.format(Locale.ROOT, "%.1f", p.getHealth())); values.put("player_food", String.valueOf(p.getFoodLevel())); values.put("player_level", String.valueOf(p.getLevel())); values.put("player_exp", String.format(Locale.ROOT, "%.0f", p.getExp() * 100));
        String session = String.format(Locale.ROOT, "%02d:%02d:%02d", seconds / 3600, seconds / 60 % 60, seconds % 60); values.put("player_online_time", session); values.put("session_time", session);
        values.put("rank", rank); values.put("rank_prefix", r.getString("prefix", "")); values.put("rank_suffix", r.getString("suffix", "")); values.put("rank_color", r.getString("color", "#AAAAAA"));
        values.put("server_name", cfg("config").getString("server.name", "Server")); values.put("server_ip", cfg("config").getString("server.ip", "")); values.put("server_port", String.valueOf(Bukkit.getPort())); values.put("server_online", String.valueOf(Bukkit.getOnlinePlayers().size())); values.put("server_max_players", String.valueOf(Bukkit.getMaxPlayers()));
        values.put("server_tps", metric("getTPS", unavailable)); values.put("server_mspt", metric("getAverageTickTime", unavailable)); values.put("server_ram_used", String.valueOf((rt.totalMemory() - rt.freeMemory()) / 1048576)); values.put("server_ram_max", String.valueOf(rt.maxMemory() / 1048576)); values.put("server_version", Bukkit.getMinecraftVersion());
        long up = ManagementFactory.getRuntimeMXBean().getUptime() / 1000; values.put("server_uptime", String.format(Locale.ROOT, "%02d:%02d:%02d", up / 3600, up / 60 % 60, up % 60));
        values.put("date", now.format(DateTimeFormatter.ofPattern(cfg("config").getString("date.date-format", "dd/MM/yyyy"), locale))); values.put("time", now.format(DateTimeFormatter.ofPattern(cfg("config").getString("date.time-format", "HH:mm:ss"), locale))); values.put("day", String.valueOf(now.getDayOfMonth())); values.put("month", now.format(DateTimeFormatter.ofPattern("MMMM", locale))); values.put("year", String.valueOf(now.getYear())); values.put("weekday", now.format(DateTimeFormatter.ofPattern("EEEE", locale)));
        for (String name : List.of("discord", "website", "store", "twitter", "youtube", "tiktok")) values.put(name, cfg("config").getBoolean("social." + name + ".enabled", false) ? cfg("config").getString("social." + name + ".text", "") : "");
        for (Map.Entry<String, String> e : values.entrySet()) text = text.replace("%" + e.getKey() + "%", e.getValue());
        if (cfg("integrations").getBoolean("placeholderapi", true) && Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) text = PlaceholderAPI.setPlaceholders(p, text);
        return text;
    }
    private String metric(String name, String fallback) {
        try { Object value = Bukkit.getServer().getClass().getMethod(name).invoke(Bukkit.getServer()); double n = value instanceof double[] a ? a[0] : ((Number)value).doubleValue(); return String.format(Locale.ROOT, "%.2f", n); } catch (ReflectiveOperationException | RuntimeException e) { return fallback; }
    }
    private ConfigurationSection rankSection(String name) { ConfigurationSection s = cfg("ranks").getConfigurationSection("ranks." + name); return s != null ? s : Objects.requireNonNull(cfg("ranks").getConfigurationSection("ranks.DEFAULT")); }
    public String getPlayerRank(Player p) {
        String assigned = cfg("assignments").getString("players." + p.getUniqueId());
        if (assigned != null && cfg("ranks").isConfigurationSection("ranks." + assigned)) return assigned;
        ConfigurationSection root = cfg("ranks").getConfigurationSection("ranks");
        return Objects.requireNonNull(root).getKeys(false).stream().filter(k -> { ConfigurationSection r = root.getConfigurationSection(k); String permission = r == null ? "" : r.getString("permission", ""); return k.equals("DEFAULT") || (!permission.isEmpty() && p.hasPermission(permission)); }).max(Comparator.comparingInt(k -> rankSection(k).getInt("priority"))).orElse("DEFAULT");
    }
    public boolean setPlayerRank(OfflinePlayer player, String rank) {
        String normalized = rank.toUpperCase(Locale.ROOT);
        if (!cfg("ranks").isConfigurationSection("ranks." + normalized)) return false;
        Player online = player.getPlayer(); String old = online == null ? cfg("assignments").getString("players." + player.getUniqueId(), "DEFAULT") : getPlayerRank(online);
        cfg("assignments").set("players." + player.getUniqueId(), normalized);