F

make a plugin that if dragon egg in inventory only that player that has it can see locator bar no one else then the wielder and make that if in inventory give player perm strength 2 speed 2 fire resistance

Kodari AI
KodariJun 23 at 8:56 am 5
DragonEggAura
A Minecraft plugin that grants the Dragon Egg special powers. Any player holding a Dragon Egg in their inventory receives Strength II, Speed II, and Fire Resistance as permanent potion effects. They also see an exclusive boss bar locator display visible only to them. Effects and the boss bar are removed the moment the egg leaves their inventory. Fully event-driven with a tick-safe repeating task for real-time updates.

Plan:

  • DragonEggPlugin — main class, registers listener + starts task

  • DragonEggListener — handles pick-up/drop/inventory events to trigger updates

  • DragonEggTask — repeating task (every 10 ticks) syncing effects & bossbar for all online players

  • DragonEggManager — tracks active bossbars per player, apply/remove logic


Here’s what the plugin does:

Dragon Egg Detection

  • A repeating task (every 10 ticks) + inventory events keep checks real-time tight — no delay.

Boss Bar (Locator)

  • A purple segmented boss bar reading ✧ Dragon Egg — Locator Active ✧ is shown only to the egg holder. It’s created per-player and instantly removed when the egg leaves.

Potion Effects

  • Strength II, Speed II, Fire Resistance are continuously refreshed so they never expire while the egg is held, and are cleanly removed upon loss.

Edge cases handled:

  • Player joins with egg already in inventory → instant activation

  • Player disconnects → effects/bar removed

  • Inventory clicks, drops, pickups all trigger an update on the next tick so inventory state is final before checking

F

and make that wielder sees every player glowing if close but only them can see glowing no one else and make the glowing color purple

Kodari AI
KodariJun 23 at 9:02 am 38

Plan:

  1. Add GlowManager.java — tracks glow state per wielder, sends metadata + team packets via ProtocolLib

  2. Wire GlowManager into DragonEggManager + DragonEggPlugin

  3. Add ProtocolLib to build.gradle and plugin.yml

The approach: send ENTITY_METADATA glow packets only to the wielder (other players never receive them), and back the purple outline with a server-side Scoreboard team (LIGHT_PURPLE) so the client renders the correct color.

Now the GlowManager class — the core of the feature:


Here’s the complete picture of how the glow system works:

Per-player glow visibility

  • ENTITY_METADATA packets containing the glow bit (0x40) are sent only to the wielder via ProtocolLib. Other players never receive these packets, so they never see any glow — not even white.

Purple color

  • A server-side Scoreboard team de_aura_glow with LIGHT_PURPLE is maintained. When a player enters range of a wielder they’re added to it; when they leave they’re removed. The client uses team color to shade the outline, producing the purple glow.

  • NAME_TAG_VISIBILITY = NEVER on the team ensures no purple nametag leakage is visible to anyone.

Range

  • 50 block radius, synced every 10 ticks alongside the effects/bossbar update.

Version compat

  • The metadata packet write path tries the ProtocolLib 5+ WrappedDataValue API first, then falls back to the legacy WrappedDataWatcher approach for older server/ProtocolLib combinations.

Requires: ProtocolLib on the server (drop it in /plugins/ like any other plugin).

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 431
src/main/java/com/kodari/dragoneggaura/DragonEggPlugin.java
package com.kodari.dragoneggaura;

import org.bukkit.plugin.java.JavaPlugin;

public class DragonEggPlugin extends JavaPlugin {

    private DragonEggManager manager;
    private GlowManager glowManager;

    @Override
    public void onEnable() {
        glowManager = new GlowManager(this);
        manager = new DragonEggManager(this, glowManager);
        getServer().getPluginManager().registerEvents(new DragonEggListener(manager), this);
        new DragonEggTask(manager).runTaskTimer(this, 20L, 10L);
        getLogger().info("DragonEggAura enabled.");
    }

    @Override
    public void onDisable() {
        if (manager != null) {
            manager.removeAll();
        }
        getLogger().info("DragonEggAura disabled.");
    }

    public DragonEggManager getManager() {
        return manager;
    }
}