S

Make this also show into a default nametag and compatible with tab plugin

Kodari AI
KodariOct 30 at 2:26 am 1
  1. Find the existing name-display feature and make it appear in the default nametag.

  2. Check the TAB integration and add compatibility if needed.

Updated name gradients to appear as the player’s default nametag, and clearing a gradient resets it.

For TAB, use the existing %cloudgradient_name% PlaceholderAPI placeholder in TAB’s player-name or nametag format, with PlaceholderAPI integration enabled.

S

I want that this plugin will link the essential nickname and this gradient color from this plugin to link into the default nametag without needing any placeholder to put, those existing placeholder on this plugin will be optional for tab plugins.

Kodari AI
KodariOct 30 at 2:49 am 1
  • Resolve Essentials nicknames internally, with account-name fallback, and apply the selected gradient to that name.

  • Add optional direct TAB API integration so TAB’s displayed player name updates automatically; keep this plugin’s placeholders available.

  • TAB’s public nametag API only controls prefix/suffix, not the actual name text, so it cannot replace the overhead account name with a nickname without TAB format configuration.

Added direct TAB API integration, so TAB’s tab-list name is updated automatically with the Essentials nickname and selected gradient; no placeholder is needed for that. The existing placeholders remain available, and clearing the gradient restores the nickname without gradient formatting.

The overhead nametag is a limitation: TAB’s public API only exposes nametag prefixes and suffixes, not a way to replace the player’s actual name with a nickname. So showing the full nickname with its gradient above players’ heads still requires TAB nametag formatting (which can use this plugin’s placeholder) or a packet-level solution.

S

the only main thing I said is the tab plugin will be use the placeholder for the customtabname while the other one is linked into the default nametag that linked with essentials nickname and the gradients from this plugin.

Kodari AI
KodariOct 30 at 2:53 am 1
  1. Check how the current gradient and Essentials nickname are applied to the default nametag.

  2. Keep the TAB custom-tab-name placeholder available and correct any wiring needed for that split.

Separated the two name displays: the plugin applies the Essentials nickname and selected gradient to the entity’s custom name, while no longer setting the player-list name or directly overriding TAB. The name placeholder now also resolves the Essentials nickname, so TAB can use %cloudgradient_name% (or the existing %gradient_nick%) for its custom tab name.

One limitation: Bukkit cannot replace the account name in the vanilla overhead player nametag. If you mean the text above players’ heads—not an entity custom name—the reliable way to show the nickname and gradient there is TAB’s nametag format using a placeholder.

S

I do not meant to change the account name, the only main thing I want that is to change the default display nametag into this plugin because this plugin is integrate with essentials nickname and the gradient.

Kodari AI
KodariOct 30 at 2:57 am 1

Understood: the TAB-list custom name can use this plugin’s placeholder, while the overhead nametag should show the Essentials nickname with the selected gradient—without changing the account name.

The current setCustomName() code does not change a player’s default overhead nametag, so it doesn’t achieve that. Bukkit doesn’t provide a supported way to replace that nametag text while preserving the account name, and TAB’s public API can only set overhead prefixes and suffixes. The overhead nickname therefore needs a nametag feature that supports a custom name; otherwise it requires a packet-level implementation. The placeholder can remain available for TAB’s custom tab name.

S

then implement a custom name into this plugin that requires a packet-level.

Kodari AI
KodariOct 30 at 3:03 am 1
  • Render the Essentials nickname and selected gradient as an overhead text display attached to the player.

  • Hide the vanilla account-name nametag while leaving the account identity and TAB placeholders unchanged.

  • Add join/respawn/quit and shutdown handling for the display and its scoreboard team.

Implemented the overhead nickname nametag. It displays the Essentials nickname with the selected gradient, hides the vanilla account-name nametag, and leaves the player’s actual account name unchanged. TAB’s existing placeholders remain available for its custom tab name.

The overhead label uses a passenger TextDisplay, which Paper synchronizes to clients with entity packets; no ProtocolLib dependency is required. If TAB is configured to manage overhead nametags or scoreboard teams, disable that management so it doesn’t override CloudGradient’s nametag visibility.

S

Make the nametag display the same height with the display name because the current one is too low that it goes into my head. And also add nametag.yml so that I can change whenever I want and also also add a abovename and belowname to the nametag.yml

Kodari AI
KodariOct 30 at 3:26 am 1
  1. Align the overhead name with the player’s displayed-name height.

  2. Add nametag.yml settings for the main, above-name, and below-name displays.

Raised the main nametag with a configurable height-offset (default 0.5) to keep it clear of the player’s head. Added nametag.yml with optional abovename and belowname text settings; both are disabled by default and support & color codes. Reload changes with /cloudgradient reload.

The extra lines share the main text display, so they stay aligned with the name.

S

there are quite a bit of bug where it cancel any sort of teleportation that causes some of the plugins can not teleport a player.

Kodari AI
KodariOct 30 at 4:19 am 1
  1. Remove the TextDisplay passenger attachment that can interfere with player teleports.

  2. Keep the display positioned above the player independently, including across world changes.

Removed the TextDisplay passenger attachment, which could interfere with teleport plugins. The nametag now follows the player independently and respawns in the destination world when needed, so it won’t make the player a vehicle or passenger.

S

make this display nametag into a hologram-based but make sure that it doesnt show up when a player has invisibility.

Kodari AI
KodariOct 30 at 4:33 am 1
  1. Keep the player name as a floating TextDisplay hologram.

  2. Remove the hologram while its player has invisibility, and recreate it when invisibility ends.

The overhead name remains a floating TextDisplay hologram. It now disappears while the player has invisibility and is recreated when invisibility ends; the existing one-tick follow task checks this continuously.

S

make it the same as a premium unlimitednametags plugin

Kodari AI
KodariOct 30 at 4:34 am 1

Which UnlimitedNametags plugin do you mean? Please share its link/version or list the features you want copied—such as formatting, placeholders, per-player or per-world nametags, and visibility rules. I’ll match those while preserving the current invisibility and teleport behavior.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
22 1,443
src/main/java/com/velrion/cloudgradient/CloudGradientPlugin.java
package com.velrion.cloudgradient;

import java.io.File;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class CloudGradientPlugin extends JavaPlugin {
    private final GradientRepository gradientRepository = new GradientRepository();
    private final Map<GradientType, List<GradientDefinition>> gradients = new EnumMap<>(GradientType.class);
    private final Map<GradientType, FileConfiguration> guiConfigurations = new EnumMap<>(GradientType.class);
    private FileConfiguration nametagConfiguration;
    private PlayerDataManager playerDataManager;
    private GradientService gradientService;
    private NametagService nametagService;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("name-colors.yml", false);
        saveResource("chat-colors.yml", false);
        saveResource("nametag.yml", false);
        playerDataManager = new PlayerDataManager(getDataFolder());
        playerDataManager.load();
        nametagService = new NametagService(this);
        gradientService = new GradientService(this);
        reloadGradientConfigurations();

        CloudGradientCommand command = new CloudGradientCommand(this);
        getCommand("cloudgradient").setExecutor(command);
        getCommand("cloudgradient").setTabCompleter(command);
        getCommand("gradient").setExecutor(command);
        getCommand("chatcolor").setExecutor(command);
        getServer().getPluginManager().registerEvents(new GradientListener(this), this);
        if (getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            new CloudGradientPlaceholderExpansion(this).register();
            new GradientNicknamePlaceholderExpansion(this).register();
        }
        for (Player player : getServer().getOnlinePlayers()) {
            gradientService.applyName(player);
        }
        getServer().getScheduler().runTaskTimer(this, () -> {
            for (Player player : getServer().getOnlinePlayers()) {
                gradientService.applyName(player);
            }
        }, 20L, 20L);
    }

    @Override
    public void onDisable() {
        if (nametagService != null) {
            nametagService.shutdown();
        }
        if (playerDataManager != null) {
            playerDataManager.save();
        }
    }

    public void reloadGradientConfigurations() {
        reloadConfig();
        File nameFile = new File(getDataFolder(), "name-colors.yml");
        File chatFile = new File(getDataFolder(), "chat-colors.yml");
        File nametagFile = new File(getDataFolder(), "nametag.yml");
        FileConfiguration nameConfiguration = YamlConfiguration.loadConfiguration(nameFile);
        FileConfiguration chatConfiguration = YamlConfiguration.loadConfiguration(chatFile);
        nametagConfiguration = YamlConfiguration.loadConfiguration(nametagFile);
        guiConfigurations.put(GradientType.NAME, nameConfiguration);
        guiConfigurations.put(GradientType.CHAT, chatConfiguration);
        gradients.put(GradientType.NAME, gradientRepository.load(nameConfiguration));
        gradients.put(GradientType.CHAT, gradientRepository.load(chatConfiguration));
        if (gradientService != null) {
            for (Player player : getServer().getOnlinePlayers()) {
                gradientService.applyName(player);
            }
        }
    }

    public List<GradientDefinition> getGradients(GradientType type) {
        return gradients.getOrDefault(type, List.of());
    }

    public FileConfiguration getGuiConfiguration(GradientType type) {
        return guiConfigurations.get(type);
    }

    public GradientDefinition findGradient(GradientType type, String id) {
        if (id == null) {
            return null;
        }
        return getGradients(type).stream().filter(gradient -> gradient.getId().equals(id)).findFirst().orElse(null);
    }

    public void sendMessage(CommandSender sender, String key) {
        sendMessage(sender, key, "", "");
    }

    public void sendMessage(CommandSender sender, String key, String placeholder, String replacement) {
        String prefix = getConfig().getString("messages.prefix", "");
        String message = getConfig().getString("messages." + key, "");
        if (!placeholder.isEmpty()) {
            message = message.replace(placeholder, replacement);
        }
        String combined = key.equals("usage") ? message : prefix + message;
        for (String line : combined.split("\\n")) {
            sender.sendMessage(ChatColor.translateAlternateColorCodes('&', line));
        }
    }

    public PlayerDataManager getPlayerDataManager() {
        return playerDataManager;
    }

    public GradientService getGradientService() {
        return gradientService;
    }

    public NametagService getNametagService() {
        return nametagService;
    }

    public FileConfiguration getNametagConfiguration() {
        return nametagConfiguration;
    }

}