noxskyyxd-ui

Create a Minecraft Paper/Spigot SMP plugin called SoulLife SMP for 1.21+ with a hardcore 4-life system. Every player starts with 4 permanent lives displayed in the center of the hotbar. Only player kills remove lives; natural deaths like lava, mobs, or fall damage do not remove lives. When a player kills another player, the victim loses 1 life and drops a rare “Soul Life” item which goes to the killer.

The Soul Life item can be stored, traded, consumed, or right-clicked to summon a powerful Soul God protector. The Soul God makes the player temporarily immune to PvP damage but unable to attack others. After the protection ends, the Soul Life returns to its original owner and restores their lost life. Each Soul Life protection can only be used once.

Add 10 custom token items with unique abilities such as invisibility, teleportation, lightning powers, lifesteal, freezing enemies, strength boosts, and random chaos effects. Tokens can be obtained from SMP start spins, killing players, crates, events, bosses, or admin commands. Tokens are not lost on natural deaths.

Include a fully animated spinning/crate INVENTORY GUI system with rare rewards, particles, sounds, broadcasts, and reward chances. Create custom GUIs for lives, tokens, spins, player stats, bounty system, and admin controls with a dark fantasy red/black design.

Add commands like:

/lives /tokens /spin /souls /protect /stats /soullife give /soullife setlives /soullife token give /soullife reload

Also include bounty mechanics, kill streak rewards, Blood Moon events, Soul Storm events, bossbars, holograms, animated particles, PlaceholderAPI support, Vault support, LuckPerms support, MySQL/SQLite support, and optimized multiplayer SMP performance designed for cinematic YouTube content.

Kodari AI
KodariMay 19 at 5:42 am 29,422 (v2)

I’ll create a hardcore SMP plugin with a cinematic 4-life system, Soul Life mechanics, and animated GUI features.

SoulLifeSMP
A hardcore SMP plugin featuring a 4-life system where only player kills matter. Soul Life items provide temporary immunity and life restoration. Includes 10 unique token abilities, animated spinning GUI system, bounty mechanics, Blood Moon/Soul Storm events, kill streaks, and cinematic particle effects for YouTube content. Full MySQL/SQLite support with PlaceholderAPI and Vault integration.

Let me build this comprehensive SMP system with all the cinematic features you requested.

Continuing with managers and inventory system…

Now I’ll create the inventory GUI system and event managers:

Continuing with the remaining files in the next response…

noxskyyxd-ui

The compilation failed with this error:

code
Compilation failed with 1 error(s):

ERROR in src/main/java/com/soullifesmp/SoulLifeSMP.java at line 214: unclosed character literal
I'll continue creating the comprehensive data structures and managers for the life system, souls, and tokens.
 ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/com/soullifesmp/SoulLifeSMP.java

Please fix this error by creating a new artifact with the corrected code.

noxskyyxd-ui

The compilation failed with this error:

code
Compilation failed with 1 error(s):

ERROR in src/main/java/com/soullifesmp/SoulLifeSMP.java at line 214: unclosed character literal
I'll continue creating the comprehensive data structures and managers for the life system, souls, and tokens.
 ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/com/soullifesmp/SoulLifeSMP.java

Please fix this error by creating a new artifact with the corrected code.

noxskyyxd-ui

The compilation failed with this error:

code
Compilation failed with 1 error(s):

ERROR in src/main/java/com/soullifesmp/SoulLifeSMP.java at line 214: unclosed character literal
I'll continue creating the comprehensive data structures and managers for the life system, souls, and tokens.
 ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/com/soullifesmp/SoulLifeSMP.java

Please fix this error by creating a new artifact with the corrected code.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
21 2,103
src/main/java/com/soullifesmp/SoulLifeSMP.java
package com.soullifesmp;

import com.soullifesmp.commands.*;
import com.soullifesmp.data.DatabaseHandler;
import com.soullifesmp.hooks.LuckPermsHook;
import com.soullifesmp.hooks.PlaceholderAPIHook;
import com.soullifesmp.hooks.VaultHook;
import com.soullifesmp.inventory.gui.GUIListener;
import com.soullifesmp.inventory.gui.GUIManager;
import com.soullifesmp.listeners.*;
import com.soullifesmp.managers.*;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.util.logging.Level;

@Getter
public class SoulLifeSMP extends JavaPlugin {
    
    private DatabaseHandler databaseHandler;
    private DataManager dataManager;
    private LifeManager lifeManager;
    private SoulLifeManager soulLifeManager;
    private TokenManager tokenManager;
    private BountyManager bountyManager;
    private KillStreakManager killStreakManager;
    private EventManager eventManager;
    private SpinManager spinManager;
    private GUIManager guiManager;
    
    private VaultHook vaultHook;
    private PlaceholderAPIHook placeholderAPIHook;
    private LuckPermsHook luckPermsHook;
    
    private FileConfiguration messagesConfig;
    private FileConfiguration databaseConfig;
    
    @Override
    public void onEnable() {
        long startTime = System.currentTimeMillis();
        
        getLogger().info("§4========================================");
        getLogger().info("§cStarting SoulLife SMP...");
        getLogger().info("§4========================================");
        
        saveDefaultConfig();
        loadConfigs();
        
        initializeDatabase();
        initializeManagers();
        initializeHooks();
        registerCommands();
        registerListeners();
        
        startTasks();
        
        long loadTime = System.currentTimeMillis() - startTime;
        getLogger().info("§4========================================");
        getLogger().info("§aSoulLife SMP enabled! §7(" + loadTime + "ms)");
        getLogger().info("§4========================================");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("§4========================================");
        getLogger().info("§cShutting down SoulLife SMP...");
        getLogger().info("§4========================================");
        
        if (eventManager != null) {
            eventManager.shutdown();
        }
        
        if (dataManager != null) {
            dataManager.saveAllData();
        }
        
        if (databaseHandler != null) {
            databaseHandler.close();
        }
        
        getLogger().info("§cSoulLife SMP disabled!");
    }
    
    private void loadConfigs() {
        File messagesFile = new File(getDataFolder(), "messages.yml");
        if (!messagesFile.exists()) {
            saveResource("messages.yml", false);
        }
        messagesConfig = YamlConfiguration.loadConfiguration(messagesFile);
        
        File databaseFile = new File(getDataFolder(), "database.yml");
        if (!databaseFile.exists()) {
            saveResource("database.yml", false);
        }
        databaseConfig = YamlConfiguration.loadConfiguration(databaseFile);
    }
    
    private void initializeDatabase() {
        try {
            databaseHandler = new DatabaseHandler(this);
            databaseHandler.initialize();
            getLogger().info("§aDatabase initialized successfully!");
        } catch (Exception e) {
            getLogger().log(Level.SEVERE, "Failed to initialize database!", e);
            Bukkit.getPluginManager().disablePlugin(this);
        }
    }
    
    private void initializeManagers() {
        guiManager = new GUIManager();
        dataManager = new DataManager(this);
        lifeManager = new LifeManager(this);
        soulLifeManager = new SoulLifeManager(this);
        tokenManager = new TokenManager(this);
        bountyManager = new BountyManager(this);
        killStreakManager = new KillStreakManager(this);
        eventManager = new EventManager(this);
        spinManager = new SpinManager(this);
        
        getLogger().info("§aAll managers initialized!");
    }
    
    private void initializeHooks() {
        if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
            vaultHook = new VaultHook(this);
            if (vaultHook.hook()) {
                getLogger().info("§aHooked into Vault!");
            }
        }
        
        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            placeholderAPIHook = new PlaceholderAPIHook(this);
            if (placeholderAPIHook.register()) {
                getLogger().info("§aHooked into PlaceholderAPI!");
            }
        }
        
        if (Bukkit.getPluginManager().isPluginEnabled("LuckPerms")) {
            luckPermsHook = new LuckPermsHook();
            getLogger().info("§aHooked into LuckPerms!");
        }
    }
    
    private void registerCommands() {
        getCommand("lives").setExecutor(new LivesCommand(this));
        getCommand("tokens").setExecutor(new TokensCommand(this));
        getCommand("spin").setExecutor(new SpinCommand(this));
        getCommand("souls").setExecutor(new SoulsCommand(this));
        getCommand("protect").setExecutor(new ProtectCommand(this));
        getCommand("stats").setExecutor(new StatsCommand(this));
        getCommand("soullife").setExecutor(new SoulLifeCommand(this));
        
        getLogger().info("§aCommands registered!");
    }
    
    private void registerListeners() {
        PluginManager pm = Bukkit.getPluginManager();
        
        pm.registerEvents(new GUIListener(guiManager), this);
        pm.registerEvents(new PlayerDeathListener(this), this);
        pm.registerEvents(new PlayerJoinListener(this), this);
        pm.registerEvents(new PlayerInteractListener(this), this);
        pm.registerEvents(new PlayerDamageListener(this), this);
        
        getLogger().info("§aListeners registered!");
    }
    
    private void startTasks() {
        Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
            if (dataManager != null) {
                dataManager.saveAllData();
            }
        }, 6000L, 6000L);
        
        getLogger().info("§aBackground tasks started!");
    }
    
    public void reloadConfigs() {
        reloadConfig();
        loadConfigs();
        
        if (eventManager != null) {
            eventManager.reload();
        }
        if (bountyManager != null) {
            bountyManager.reload();
        }
    }
    
    public String getMessage(String path) {
        String message = messagesConfig.getString(path, "");
        String prefix = messagesConfig.getString("prefix", "");
        return message.replace("{prefix}", prefix)
                     .replace("&", "§");
    }