cnib_1

Make a Paper 1.21.11 plugin called "Blessings SMP".

There are 8 Blessings. Each is unlocked by a custom advancement. Only 1 player can own each Blessing, and each player can only own 1 Blessing.

Death:

  • Killed by player = killer gets the Blessing.
  • Killer's old Blessing becomes obtainable again.
  • Environment death = Blessing becomes obtainable again.
  • Voidwalker is obtained by getting the Dragon Egg. If its owner dies to the environment, Voidwalker is permanently removed until the server is reset.

Advancements:

Blazeheart - Kill 2 players with lava.

Tidecaller - Kill 2 players in water.

Shadowborn - Kill a player while invisible.

Stormbringer - Kill a player with TNT/Creeper.

Earthwarden - Kill 3 players in the Deep Dark.

Windrunner - Kill a player with a Mace.

Frostbound - Kill 10 players.

Voidwalker - Obtain the Dragon Egg.

Abilities:

Blazeheart: Fire Resistance, lava immunity, Blazes ignore you, melee burns for 5s.

Tidecaller: 2x swim speed, Water Breathing, Strength II in water.

Shadowborn: Invisible at night, hidden armor, reduced mob detection.

Stormbringer: Strength II in thunderstorms, lightning immunity, summon lightning (60s).

Earthwarden: Speed II in Deep Dark, sonic immunity, Sonic Boom (45s).

Windrunner: Double jump, dash (8s), no fall damage after jumping.

Frostbound: Freeze enemies 3s, walk on frozen water, powdered snow immunity.

Voidwalker: 20 hearts, no pearl damage, 50% pearl cooldown, blink (30s), Speed II + Strength II in the End.

Show the current Blessing above the hotbar like the Glitches SMP glitch display, with icon, name, and cooldowns.

Add: /obtainability <advancement> <true|false> /obtainability list

Locked advancements cannot be earned. Save all data. Include plugin.yml, config.yml, permissions, and a simple vanilla-style resource pack with blessing icons.

Kodari AI
KodariJul 8 at 8:29 pm 73

I’ll build the full plugin now — this is a large project with many interconnected systems (blessing ownership, advancement-driven unlocks, combat attribution, passive/active abilities, action bar display, persistence, and admin commands).

BlessingsSMP
A Paper 1.21 plugin adding 8 unique Blessings unlocked via custom advancements (Blazeheart, Tidecaller, Shadowborn, Stormbringer, Earthwarden, Windrunner, Frostbound, Voidwalker). Only one player can hold each Blessing at a time. PvP kills steal the victim's Blessing; environment deaths free it (Voidwalker is permanently lost if its owner dies to the environment). Each Blessing grants unique passive and active abilities with cooldowns, shown above the hotbar with icon, name, and status. Includes /obtainability admin command to lock/unlock advancements, full YAML persistence, permissions, and a vanilla-style resource pack scaffold for custom icons.
A Paper 1.21 SMP plugin with 8 exclusive player Blessings unlocked via custom advancements (kill players with lava/water/TNT/Creeper/mace, kill while invisible, kill in Deep Dark, 10 kills, or obtain the Dragon Egg). Only one player may hold each Blessing at a time. PvP kills steal the victim's Blessing; environment deaths free it (Voidwalker is lost forever on environment death). Each Blessing grants unique passive and active abilities with cooldowns, shown live above the hotbar. Includes /obtainability admin command to lock/unlock advancements, full YAML persistence, permissions, and a vanilla-style resource pack scaffold for blessing icons.

Built BlessingsSMP — a full Paper 1.21 plugin:

  • 8 Blessings (Blessing enum) each backed by a real vanilla advancement (loaded at runtime via Bukkit.getUnsafe().loadAdvancement, so they show real vanilla toasts) with minecraft:impossible criteria awarded programmatically once your tracked conditions are met.

  • BlessingManager — single-owner enforcement, obtainability flags, permanent Voidwalker lock, full YAML persistence (blessings.yml).

  • ProgressManager — tracks lava/water/Deep-Dark/total kill counts per player (progress.yml).

  • CombatTracker/CombatTrackerListener — 20s “recent attacker” credit window so environment kills (lava, water, TNT, Creeper) can be attributed to the right player.

  • PlayerDeathListener — handles the full death/steal flow: PvP kill steals victim’s Blessing (old one freed), environment death frees the Blessing, Voidwalker is permanently destroyed on environment death.

  • AdvancementListener / DragonEggListener — grant Voidwalker on Dragon Egg pickup/inventory transfer.

  • AbilityManager — 1s tick loop applying all 8 passive kits and sending the live action-bar display (icon glyph + name + ability cooldown/status), plus active-ability execution (lightning, sonic boom, dash, blink) with cooldowns triggered via swap-hands key.

  • AbilityListener — damage immunities (lava, lightning, sonic boom, freeze, fall, pearl-fall), melee burn/freeze procs, Blaze/mob targeting evasion, double-jump via toggle-flight trick, pearl cooldown halving.

  • /obtainability <advancement> <true|false> and /obtainability list, permission blessingssmp.admin.

  • All XSeries-mandated wrappers used (XMaterial, XPotion, XSound, XParticle, XAttribute) instead of raw Bukkit enums.

  • plugin.yml, config.yml (cooldowns), permissions, and a resource-pack scaffold (pack.mcmeta + custom font provider) ready for 8 icon PNGs to be dropped in — actual pixel art isn’t something I can generate, so the JSON wiring is in place for a designer to fill in.

Kodari can make mistakes. Review important code before using.
Files
resourcepack
src
build.gradle
settings.gradle
Code
26 1,228
src/main/java/com/blessingssmp/BlessingsSMP.java
package com.blessingssmp;

import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.advancement.Advancement;
import org.bukkit.advancement.AdvancementProgress;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.InputStream;
import java.nio.charset.StandardCharsets;

@Getter
public class BlessingsSMP extends JavaPlugin {
    private BlessingManager blessingManager;
    private ProgressManager progressManager;
    private CombatTracker combatTracker;
    private AbilityManager abilityManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.blessingManager = new BlessingManager(this);
        this.progressManager = new ProgressManager(this);
        this.combatTracker = new CombatTracker();
        this.abilityManager = new AbilityManager(this);

        registerAdvancements();

        Bukkit.getPluginManager().registerEvents(new CombatTrackerListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new AdvancementListener(this), this);
        Bukkit.getPluginManager().registerEvents(new DragonEggListener(this), this);
        Bukkit.getPluginManager().registerEvents(new AbilityListener(this), this);

        ObtainabilityCommand obtainabilityCommand = new ObtainabilityCommand(this);
        getCommand("obtainability").setExecutor(obtainabilityCommand);
        getCommand("obtainability").setTabCompleter(obtainabilityCommand);

        abilityManager.start();
    }

    @Override
    public void onDisable() {
        if (blessingManager != null) blessingManager.save();
        if (progressManager != null) progressManager.save();
    }

    private void registerAdvancements() {
        for (Blessing blessing : Blessing.values()) {
            NamespacedKey key = blessing.advancementKey(this);
            try {
                if (Bukkit.getAdvancement(key) != null) {
                    Bukkit.getUnsafe().removeAdvancement(key);
                }
                String path = "advancements/" + blessing.getId() + ".json";
                try (InputStream in = getResource(path)) {
                    if (in == null) {
                        getLogger().warning("Missing advancement file: " + path);
                        continue;
                    }
                    String json = new String(in.readAllBytes(), StandardCharsets.UTF_8);
                    Bukkit.getUnsafe().loadAdvancement(key, json);
                }
            } catch (Exception e) {
                getLogger().warning("Failed to register advancement " + key + ": " + e.getMessage());
            }
        }
    }

    public void awardAdvancement(Player player, Blessing blessing) {
        NamespacedKey key = blessing.advancementKey(this);
        Advancement advancement = Bukkit.getAdvancement(key);
        if (advancement == null) return;
        AdvancementProgress progress = player.getAdvancementProgress(advancement);
        if (progress.isDone()) return;
        for (String criteria : progress.getRemainingCriteria()) {
            progress.awardCriteria(criteria);
        }
    }
}