Sha Dow

Task: Generate a fully functional Minecraft HeartSMP plugin compatible with modern Spigot/Paper architecture. Program the entire plugin using modular event listeners, automated tasks, and command executables based on the detailed system specifications below.

  1. CORE HEARTS & UPGRADEABLE ABILITY TRIGGERS

• The 6 Base Hearts: Implement exactly 6 distinct custom elemental heart item types: Fire, Star, Earth, Water, Wind, and Lightning. • The Secret 7th Heart (Admin Heart): Implement a hidden, un-craftable item called the "Admin Heart". It can only be created at a standard crafting bench by putting all 6 base hearts together in the grid simultaneously. • The 5-Level Ability Framework: Every heart features structural abilities mapped across exactly 7 strict player action inputs: 1. Crouch Only 2. Jump + Crouch Click 3. Jump + Click 4. Standard Click 5. Standard Hit 6. Jump + Crouch Hit 7. Crouch + Hit • Progression Scaling: Program a leveling scale from Level 1 up to Level 5 for all actions. • Look Wise (Visuals): Scale particle densities, radius size, speeds, and volumetric transitions linearly up to Level 5. • Damage Wise (Combat): Linearly multiply flat attack damage data calculations, status impacts, or area-of-effect yields relative to the active level tier.

  1. SYSTEM MANAGEMENT COMMANDS & LIFECYCLE

• Automatic Starter Hearts: Detect when a player first logs onto the server or spawns fresh after dying. The system must automatically select a completely random base heart out of the 6 elements and safely inject it straight into their inventory. • SMP Activation: Register a root command /start. When executed by an Operator, it globally initializes the HeartSMP gameplay systems across the server. • Life Withdrawal: Register the command /wh (/withdrawheart). This allows any player to safely extract one of their active heart layers and drop it as a physical, pickup-able custom item stack. • Operator Handout Controls: Register a permission-locked command /gh (/giveheart). Only Server Operators or the Server Owner can bypass rules. It must allow arguments matching heart names to give items directly, such as /gh star <playername> or /gh admin_heart <playername>.

  1. RITUAL CIRCLES, SACRIFICES, & BAN MECHANICS

Track physical structures or specific coordinate arrays checking for a functional Ritual Circle used to sacrifice "Player Souls" (every player tracks up to 3 individual souls): • Standard Banishment Branch: If a player places another player's captured soul items inside an active Ritual Circle, the server instantly executes an authoritative ban on that victim. The player who ran the ritual is immediately rewarded with a custom heart matching the banned victim's element type. • The Admin Heart Cheat Code: If an administrator holds or triggers a ritual using the Admin Heart, it grants them "Single-Soul Banishment." They can instantly target and permanently ban any player using only a single one of their souls, bypassing the normal rules. It also grants access to instant illegal item setups and maxed-out custom armor generation.

  1. THE 1-MINUTE BLIND SOUL TAKEOVER LOOP

Program an automatic, high-priority damage mitigation engine to monitor fatal damage strikes between players: • Fatal Blow Takeover Trigger: If a player takes damage that would drop their health below 0, do not let them die. If they have successfully absorbed all 3 souls of another unique player in the past, trigger a "Soul Awakening Takeover." • The Black Screen Effect: Instantly blind the host player with maximum visual Blindness (simulating a pitch-black screen) for the duration of the takeover. • The 1-Minute Vengeance Window: Keep the host player alive at 1 HP while the awakened soul takes over their body for exactly 60 seconds (1 minute). • The Revive Condition: Track combat vectors during this 1-minute timer. If the host player's character successfully slays the exact attacker who triggered the fatal blow before the time runs out, clear the black screen effect, fully stabilize/heal them, and completely revive them. If the 60 seconds pass without killing the attacker, the host dies permanently.

Kodari AI
KodariOct 6 at 6:14 am 3
HeartSMP
HeartSMP is a comprehensive Minecraft plugin implementing a 6-element heart system (Fire, Star, Earth, Water, Wind, Lightning) with a secret 7th Admin Heart. Each heart features 5-level upgradeable abilities triggered by 7 distinct player actions including crouch, jump, and click combinations. The plugin manages automatic starter heart distribution, SMP activation via /start, heart withdrawal with /wh, and operator handout commands with /gh. It includes a ritual circle system for soul sacrifice and player banishment, plus a 1-minute blind soul takeover mechanic where players with 3 absorbed souls can temporarily possess their killer's body for vengeance before permanent death.
  1. Create the plugin project, persistent heart/soul data, custom items, and the six-heart Admin Heart recipe.

  2. Add lifecycle, seven-input abilities with five upgrade levels, soul capture, and the timed fatal-blow takeover.

  3. Add ritual-circle banishment and /start, /wh, /gh, and /heart commands.

Created the HeartSMP plugin with persistent player profiles, custom items, event listeners, scheduled ritual checks, and command handlers.

  • Hearts and abilities: Six elemental hearts plus an Admin Heart craftable from all six base hearts in a 2×3 crafting-grid recipe. Players get a random base heart on first join and after respawning. All seven inputs have levels 1–5; /heart upgrade <action> spends XP levels to upgrade.

  • Souls and rituals: Player kills can generate up to three soul items per victim. Place them on the center of a circle made from one Crying Obsidian block surrounded by eight Obsidian blocks. A standard ritual needs three souls; holding an Admin Heart reduces that to one. A successful ritual bans the victim and rewards the ritual runner with the victim’s heart type.

  • Takeover and commands: Absorbing three souls from the same victim can trigger a 60-second fatal-blow takeover; killing the attacker revives the host, while timeout permanently bans them. Added /start, /wh (/withdrawheart), /gh (/giveheart), and /heart adminkit for active Admin Heart holders.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
20 1,543
src/main/java/com/kodari/heartsmp/HeartSMPPlugin.java
package com.kodari.heartsmp;

import com.kodari.heartsmp.ability.AbilityManager;
import com.kodari.heartsmp.ability.TakeoverManager;
import com.kodari.heartsmp.command.GiveHeartCommand;
import com.kodari.heartsmp.command.HeartCommand;
import com.kodari.heartsmp.command.StartCommand;
import com.kodari.heartsmp.command.WithdrawCommand;
import com.kodari.heartsmp.data.ProfileManager;
import com.kodari.heartsmp.heart.HeartType;
import com.kodari.heartsmp.items.HeartItems;
import com.kodari.heartsmp.listener.AbilityListener;
import com.kodari.heartsmp.listener.HeartLifecycleListener;
import com.kodari.heartsmp.listener.TakeoverListener;
import com.kodari.heartsmp.ritual.RitualManager;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.RecipeChoice;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Date;
import java.util.Map;

public class HeartSMPPlugin extends JavaPlugin {
    private ProfileManager profiles;
    private HeartItems heartItems;
    private AbilityManager abilityManager;
    private TakeoverManager takeoverManager;
    private RitualManager ritualManager;
    private boolean started;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        started = getConfig().getBoolean("started", false);
        profiles = new ProfileManager(this);
        heartItems = new HeartItems(this);
        abilityManager = new AbilityManager(this);
        takeoverManager = new TakeoverManager(this);
        ritualManager = new RitualManager(this);

        getServer().getPluginManager().registerEvents(new HeartLifecycleListener(this), this);
        getServer().getPluginManager().registerEvents(new AbilityListener(this), this);
        getServer().getPluginManager().registerEvents(new TakeoverListener(this), this);

        getCommand("start").setExecutor(new StartCommand(this));
        getCommand("wh").setExecutor(new WithdrawCommand(this));
        getCommand("gh").setExecutor(new GiveHeartCommand(this));
        getCommand("heart").setExecutor(new HeartCommand(this));

        registerAdminHeartRecipe();
        ritualManager.start();
        getLogger().info("HeartSMP enabled.");
    }

    @Override
    public void onDisable() {
        if (profiles != null) {
            profiles.saveAll();
        }
        if (ritualManager != null) {
            ritualManager.stop();
        }
        if (takeoverManager != null) {
            takeoverManager.shutdown();
        }
    }

    public ProfileManager getProfiles() {
        return profiles;
    }

    public HeartItems getHeartItems() {
        return heartItems;
    }

    public AbilityManager getAbilityManager() {
        return abilityManager;
    }

    public TakeoverManager getTakeoverManager() {
        return takeoverManager;
    }

    public boolean isStarted() {
        return started;
    }

    public void setStarted(boolean started) {
        this.started = started;
        getConfig().set("started", started);
        saveConfig();
    }

    public void banPlayer(java.util.UUID victimId, String victimName, Player actor) {
        String source = actor == null ? "HeartSMP" : actor.getName();
        Bukkit.getBanList(BanList.Type.NAME).addBan(victimName, "Banished through a HeartSMP ritual", (Date) null, source);
        Player victim = Bukkit.getPlayer(victimId);
        if (victim != null) {
            victim.kickPlayer("You have been banished through a HeartSMP ritual.");
        }
    }

    private void registerAdminHeartRecipe() {
        NamespacedKey key = new NamespacedKey(this, "admin_heart_craft");
        Bukkit.removeRecipe(key);
        ItemStack result = heartItems.createHeart(HeartType.ADMIN_HEART);
        ShapedRecipe recipe = new ShapedRecipe(key, result);
        recipe.shape("ABC", "DEF");
        recipe.setIngredient('A', new RecipeChoice.ExactChoice(heartItems.createHeart(HeartType.FIRE)));
        recipe.setIngredient('B', new RecipeChoice.ExactChoice(heartItems.createHeart(HeartType.STAR)));
        recipe.setIngredient('C', new RecipeChoice.ExactChoice(heartItems.createHeart(HeartType.EARTH)));
        recipe.setIngredient('D', new RecipeChoice.ExactChoice(heartItems.createHeart(HeartType.WATER)));
        recipe.setIngredient('E', new RecipeChoice.ExactChoice(heartItems.createHeart(HeartType.WIND)));
        recipe.setIngredient('F', new RecipeChoice.ExactChoice(heartItems.createHeart(HeartType.LIGHTNING)));
        Bukkit.addRecipe(recipe);
    }
}