venq1xxx

Create a Minecraft Paper plugin named "GlyphSMP" compatible with 1.20.4 to 1.21.11. Use Java 17, Paper API only, MiniMessage. No NMS, no dependencies.

ITEM SYSTEM:

  1. Base: Material.AMETHYST_SHARD with customModelData 101=G1 to 109=G9.
  2. DisplayName: "<gradient:#7B68EE:#FF55FF>Glyph of {glyph_name}</gradient>". Never use word "Shard" in name.
  3. Lore format exactly:

Line0: "<#AAAAAA>───────────────────" Line1: "<#FFD700>Ability: {short_name}" Line2: "<#FFFFFF>{desc_line_1}" Line3: "<#FFFFFF>{desc_line_2}" Line4: "<#FFFFFF>" Line5: "<#55FF55>Cooldown: <#FFFFFF>{cd}s" Line6: "<#55FFFF>Trigger: <#FFFFFF>{keybind}" Line7: "<#AAAAAA>───────────────────" Line8: "<#555555>Bound to: {owner_name}" Line9: "<#555555>Unique ID: {nano}" Line10: "<#FF0000>⚠ Drop = stealable"

NBT SECURITY - CRITICAL - NO NAME CHECK:

  1. Use PersistentDataContainer with NamespacedKey "glyph_id" String, "glyph_owner" String UUID, "glyph_unique" Long nanoTime.
  2. Validation on PlayerInteractEvent: if!item.hasPDC("glyph_id") ||!item.PDC("glyph_owner").equals(player.UUID.toString()) ||!player.PDC("active_glyph_id").equals(item.PDC("glyph_id")) -> cancel event + send "<#FF5555>This is a fake glyph or not bound to you".
  3. Display name and lore are IRRELEVANT for validation. Renamed items MUST fail.

SOUND SYSTEM:

All sounds use low volume. Abilities 0.5f, UI clicks 0.3f, errors 0.4f, final reveal 0.3f. Always pitch 1.0f unless specified.

THE 9 GLYPHS - ULTRA UNIQUE:

G1 Chrono Rewind: Store HashMap<UUID, Queue<Pair<Location,Double>>> last 80 ticks. Right click -> teleport+setHealth to 80 ticks ago. CD120s. Sound BLOCK_PORTAL_TRAVEL 0.5f. Lore: "Right click to rewind 4s back in time. Escape death." Trigger: "Right Click"

G2 Mimic Plague: Shift+Right click player -> Map<UUID, Pair<UUID,Long>> expires 15s. If target uses glyph, give caster 1 free use. CD90s. Sound ENTITY_ILLUSIONER_CAST_SPELL 0.5f. Lore: "Copy enemy ability once. Shift+RC on player." Trigger: "Shift+RC Player"

G3 Pocket Dimension: Right click block -> place 5x5x5 bedrock for 200t. Store List<Location> to remove. Whitelist team UUIDs, others get PlayerMoveEvent cancel if entering. CD180s. Sound BLOCK_END_PORTAL_SPAWN 0.5f. Lore: "Create safe room 10s. RC on ground." Trigger: "Right Click Ground"

G4 Life Swap: Right click player <=15b -> double hp1=target.getHealth(); target.setHealth(player.getHealth()); player.setHealth(hp1); CD100s. Sound ENTITY_EVOKER_CAST_SPELL 0.5f. Lore: "Swap HP with enemy. RC on player." Trigger: "Right Click Player"

G5 Gravity Well: Right click air -> spawn armorstand marker 120t. Every 2t pull entities <=7b by vector *0.3, damage 0.5. CD70s. Sound ENTITY_WITHER_AMBIENT 0.5f. Lore: "Black hole pulls enemies. RC in air." Trigger: "Right Click Air"

G6 Soul Anchor: Shift+Right click -> player.PDC.set("soul_anchor", player.getLocation()). On PlayerDeathEvent if PDC has key, BukkitRunnable 100t later respawn at loc with 50% max health + drop items back, clear key. One time use. CD150s. Sound ITEM_TOTEM_USE 0.5f. Lore: "Set respawn point. Shift+RC. One time use." Trigger: "Shift+RC"

G7 Reality Slash: Right click -> get direction, place 12x1x4 barrier blocks for 80t in line. Store to remove. CD60s. Sound BLOCK_GLASS_PLACE 0.5f. Lore: "Create wall 4s. RC forward." Trigger: "Right Click"

G8 Quantum Entangle: Right click teammate -> Map<UUID,Pair<UUID,Long>> 20s. On EntityDamageEvent if either damaged, apply 50% to partner. CD110s. Sound BLOCK_BEACON_POWER_SELECT 0.5f. Lore: "Link HP with ally 20s. RC teammate." Trigger: "Right Click Teammate"

G9 Pandora's Box: Right click -> for Player p : Bukkit.getOnlinePlayers(), if p.team==caster.team give random PotionEffectType beneficial 200t, else random harmful 200t. CD200s. Sound ENTITY_ELDER_GUARDIAN_CURSE 0.5f. Lore: "Chaos for all. Enemies debuff, team buff." Trigger: "Right Click"

CINEMATIC SPINNER - 0.5s TIMING:

Do NOT use inventory INVENTORY GUI. Use sendTitle for animation. Total 168 ticks = 8.4s.

Trigger: /smpstart confirm OR PlayerJoinEvent if smp_started==true && PDC=="NONE" Process:

  1. player.setMetadata("rolling", new FixedMetadataValue(plugin, true)); player.setWalkSpeed(0f);
  2. int finalGlyph = ThreadLocalRandom.current().nextInt(1,10); int[] seq = {1,2,3,4,5,6,finalGlyph,finalGlyph,finalGlyph,finalGlyph};
  3. int[] delays = {10,10,10,10,12,16,20,20}; // ticks: 0.5s,0.5s,0.5s,0.5s,0.6s,0.8s,1s,1s
  4. new BukkitRunnable(){int i=0;int tick=0;public void run(){if(i>=seq.length){cancel();return;} int g=seq[i]; String name=getGlyphName(g); int cmd=100+g; player.sendTitle(" ", "<#7B68EE>Glyph of "+name, 0, delays[i]+5, 0); player.playSound(player.getLocation(), Sound.UI_BUTTON_CLICK, 0.3f, 1.0f); player.sendActionBar(MiniMessage.miniMessage().deserialize("<#AAAAAA>Selecting your fate...")); i++;}}.runTaskTimer(plugin, 0L, delays[i]);
  5. After 128t: player.sendTitle("<gradient:#FFD700:#FF55FF>Glyph of "+finalName+"</gradient>", "<#AAAAAA>You have been chosen", 10, 70, 20); player.playSound(player.getLocation(), Sound.UI_TOAST_CHALLENGE_COMPLETE, 0.3f, 1.2f); spawn FIREWORK_ROCKET.
  6. After 168t: create ItemStack with full NBT+lore+CMD+owner=player, player.PDC.set("active_glyph_id","G"+finalGlyph), giveItem/drop, removeMetadata("rolling"), setWalkSpeed(0.2f), playSound ITEM_PICKUP 0.4f, broadcast "<#7B68EE>{player} <#AAAAAA>awakened <#FF55FF>{name}<#AAAAAA>!".

EVENTS:

  1. PlayerInteractEvent: NBT validation before ability. Cancel if item is glyph.
  2. InventoryClickEvent: if clickTopInv.getType()==ENDER_CHEST && (cursor||current).hasPDC("glyph_id") -> cancel + send config.messages.echest_block.
  3. PlayerDeathEvent: do nothing. Allow natural drop.
  4. PlayerMoveEvent: if player.hasMetadata("rolling") -> to.set(from.getX(), from.getY(), from.getZ(), to.getYaw(), to.getPitch());
  5. PlayerItemHeldEvent: if new item fails owner check, do nothing. Just ability won't work.

COMMANDS - All tabcomplete:

  1. /glyph - Open personal INVENTORY GUI showing current glyph, description, live cooldown timer. Perm glyph.use
  2. /glyph give <player> <G1-G9|random> - Create item with full NBT+lore+CMD, set target PDC, remove old glyph. Perm glyph.admin
  3. /glyph remove <player> - Set PDC "NONE", remove all matching items from inv. Perm glyph.admin
  4. /glyph set <player> <G1-G9> - Set PDC only. Perm glyph.admin
  5. /glyph info <player> - Show PDC + cooldowns. Perm glyph.admin
  6. /glyph resetcooldowns <player|all> - Clear map. Perm glyph.admin
  7. /glyph reload - Reload config.yml. Perm glyph.admin
  8. /smpstart confirm - Start spinner for all online. Perm glyph.admin

COOLDOWN SYSTEM:

HashMap<UUID, Map<String, Long>> cooldowns. On use check System.currentTimeMillis. If on CD: actionbar "<#FF5555>Cooldown: {s}s" + BLOCK_NOTE_BLOCK_BASS 0.4f. Save to cooldowns.yml onDisable, load onEnable.

CONFIG.YML: smp_started: false block_enderchest: true sounds: ability_vol: 0.5 ui_vol: 0.3 reveal_vol: 0.3 error_vol: 0.4 messages: prefix: "<#7B68EE>Glyph ᴘᴠᴘ <#555555>» " fake_glyph: "<#FF5555>This is a fake glyph or not bound to you" echest_block: "<#FF5555>Glyphs cannot be stored in Ender Chests" no_glyph: "<#FF5555>You have not awakened a glyph yet" cooldown: "<#FF5555>Cooldown: {time}s" cooldowns:

G1: 120 G2: 90 G3: 180 G4: 100 G5: 70 G6: 150 G7: 60 G8: 110 G9: 200

STRUCTURE: Main, GlyphManager, AbilityManager, CooldownManager, SpinnerManager, NBTUtil, CommandManager, ListenerManager. Keep under 78k tokens.

Comments: //TEXTURE_HOOK for Material and CMD, //NBT_HOOK for PDC logic, //SPINNER_HOOK for title animation.

plugin.yml: name: GlyphSMP, version: 1.0, main: com.glyphsmp.Main, api-version: 1.20, commands: glyph,smpstart, permissions: glyph.use default:true, glyph.admin default:op.

Build complete plugin. Ensure 1.20.4 to 1.21.11 compatible. Use NamespacedKey, PersistentDataType.STRING/LONG. No deprecated methods.

Kodari AI
KodariApr 12 at 3:10 pm 20,394 (v2)

I’ll create a cinematic glyph-based PvP plugin with secure NBT validation and unique abilities.

GlyphSMP
A cinematic PvP plugin where players receive unique glyphs with powerful abilities through an animated reveal system. Features 9 distinct glyphs with special powers including time manipulation, life swapping, gravity wells, and reality manipulation. Includes secure NBT validation, cooldown management, and epic spinner animations. Glyphs are stealable on drop, creating high-stakes gameplay.

Complete GlyphSMP plugin created with 9 unique abilities, cinematic spinner animation using sendTitle (no inventory GUI), secure NBT validation via PersistentDataContainer, cooldown persistence, and full Paper 1.20.4-1.21.11 compatibility using MiniMessage formatting.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
16 1,352
src/main/java/com/glyphsmp/Main.java
package com.glyphsmp;

import com.glyphsmp.command.GlyphCommand;
import com.glyphsmp.command.SMPStartCommand;
import com.glyphsmp.listener.AbilityListener;
import com.glyphsmp.listener.JoinListener;
import com.glyphsmp.listener.ProtectionListener;
import com.glyphsmp.manager.AbilityManager;
import com.glyphsmp.manager.CooldownManager;
import com.glyphsmp.manager.GlyphManager;
import com.glyphsmp.manager.SpinnerManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class Main extends JavaPlugin {
    private GlyphManager glyphManager;
    private AbilityManager abilityManager;
    private CooldownManager cooldownManager;
    private SpinnerManager spinnerManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.cooldownManager = new CooldownManager(this);
        this.glyphManager = new GlyphManager(this);
        this.abilityManager = new AbilityManager(this);
        this.spinnerManager = new SpinnerManager(this);
        
        this.cooldownManager.loadCooldowns();
        
        getCommand("glyph").setExecutor(new GlyphCommand(this));
        getCommand("smpstart").setExecutor(new SMPStartCommand(this));
        
        Bukkit.getPluginManager().registerEvents(new AbilityListener(this), this);
        Bukkit.getPluginManager().registerEvents(new ProtectionListener(this), this);
        Bukkit.getPluginManager().registerEvents(new JoinListener(this), this);
        
        getLogger().info("GlyphSMP has been enabled!");
    }

    @Override
    public void onDisable() {
        this.cooldownManager.saveCooldowns();
        getLogger().info("GlyphSMP has been disabled!");
    }
}