noobrun

make a plugin for 1.21.11 name lifepoints in which a player would get 30 lifepoints at start of smp he can withdraw lifepoints 10 at a time by withdraw command and also in starting of server 1 chunk will be free and will be surrounded by world border and by executing command /start smp will start this command should be one time executable and smp is starting should be displayed on every player screen with timer of 3 seconds and smp will start keep lifepoints mechanics as lifesteal plugin

Kodari AI
KodariApr 21 at 11:58 am 8,927 (v2)

I’ll create a LifePoints plugin with lifesteal mechanics, SMP start system, and life point withdrawal.

LifePoints
A lifesteal SMP plugin where players start with 30 life points and can withdraw them to gain hearts. Features combat-based life point stealing, a one-time SMP start command with countdown timer, and an initial world border that expands when the SMP begins. Players can strategically manage their life points to increase max health or save them for critical moments. Includes configurable lifesteal rates and world border settings.

Created LifePoints plugin with lifesteal mechanics, 30 starting life points, /withdraw command for converting 10 life points into hearts, and /start command with 3-second countdown that expands the world border from 1 chunk. Players gain/lose life points in combat, and the system tracks all data persistently.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
12 655
src/main/java/com/lifepoints/LifePoints.java
package com.lifepoints;

import com.lifepoints.commands.LifePointsCommand;
import com.lifepoints.commands.StartCommand;
import com.lifepoints.commands.WithdrawCommand;
import com.lifepoints.data.PlayerDataManager;
import com.lifepoints.listeners.LifePointsListener;
import com.lifepoints.managers.ConfigManager;
import com.lifepoints.managers.WorldBorderManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public final class LifePoints extends JavaPlugin {

    private ConfigManager configManager;
    private PlayerDataManager playerDataManager;
    private WorldBorderManager worldBorderManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.worldBorderManager = new WorldBorderManager(this);
        
        playerDataManager.loadAll();
        worldBorderManager.setupInitialBorder();
        
        registerCommands();
        registerListeners();
        
        getLogger().info("LifePoints plugin enabled!");
    }

    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAll();
        }
        getLogger().info("LifePoints plugin disabled!");
    }

    private void registerCommands() {
        getCommand("start").setExecutor(new StartCommand(this));
        getCommand("withdraw").setExecutor(new WithdrawCommand(this));
        getCommand("lifepoints").setExecutor(new LifePointsCommand(this));
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new LifePointsListener(this), this);
    }
}