Aniket Das

ApsCore

ApsCore is a hardcore-style Minecraft plugin that introduces a limited-life elimination system with an admin-controlled revival mechanic.

Core System

  • Every player starts with 3 lives.
  • Whenever a player dies, their remaining lives decrease by 1.
  • When a player reaches 0 lives after their 3rd death, they are permanently banned from the server.
  • The ban should persist through reconnects and server restarts.
  • The system should clearly display the player's remaining lives.

Permanent Elimination

After a player's third death:

  • The player is automatically permanently banned.
  • Their ApsCore life data is saved.
  • Their inventory/status should remain unaffected by the ban system unless configured otherwise.
  • The player cannot rejoin normally until they are revived.

Admin Revival

Operators can revive an eliminated player using:

"/aps revive <player_name>"

The revival should require the special Revival Task to be completed.

The revival process requires:

  • 1 Dragon Egg
  • 1 Nether Star

After the required items are combined/crafted, ApsCore creates a special Revival Book.

Revival Book

The book should:

  • Have an enchanted-glint appearance.
  • Be renamed to the eliminated player's name.
  • Store the target player's identity internally so its name cannot be exploited by simply renaming another book.
  • Be usable by right-clicking the eliminated player.
  • When successfully used, the targeted player is permanently unbanned/revived and can rejoin the server.

Example:

"AniketPlaysz"

A player holding the special revival book can right-click the corresponding eliminated player to complete the revival.

Admin Elimination

Operators can manually eliminate a player using:

"/aps eliminate <player_name>"

This should immediately place the player into the ApsCore eliminated/permanently-banned state.

Commands

"/aps revive <player_name>"

Starts the revival process for the specified eliminated player.

"/aps eliminate <player_name>"

Manually eliminates and permanently bans the specified player.

Suggested additional commands

"/aps lives <player_name>" Shows the player's remaining lives.

"/aps setlives <player_name> <amount>" Allows an operator to set a player's lives.

"/aps reload" Reloads the plugin configuration.

Permissions

"apscore.admin"

Required for administrative commands such as "/aps revive", "/aps eliminate", "/aps setlives", and "/aps reload".

Important Protection

ApsCore should validate the Revival Book using internal item data/PDC rather than relying only on the visible item name. This prevents players from creating a fake book by simply renaming a normal book.

The plugin should also prevent:

  • Reviving a player who isn't eliminated.
  • Using a revival book on the wrong player.
  • Using the same revival book multiple times.
  • Bypassing the permanent ban by changing usernames.
  • Losing life data after a server restart.

Main Concept

3 Deaths → Permanent Elimination → Dragon Egg + Nether Star → Special Revival Book → Right-click the eliminated player → Player Revived.

Plugin Name: ApsCore Minecraft Version: 1.21.11 Platform: Paper

Kodari AI
KodariSep 13 at 4:01 am 2
ApsCore
A hardcore-style Minecraft plugin implementing a limited-life elimination system. Players start with 3 lives, losing one per death, and are permanently banned upon reaching zero. Admins can manually eliminate players or initiate revival processes requiring a Dragon Egg and Nether Star to craft a special enchanted Revival Book. The book stores the target player's identity internally via PDC, preventing forgery, and is used by right-clicking the eliminated player to restore their access. Includes commands for checking lives, setting lives, and reloading configuration, with comprehensive data persistence across restarts and protection against ban bypassing.
  1. Create the Gradle/Paper project metadata and plugin configuration.

  2. Implement UUID-persistent lives, elimination, login blocking, death handling, and revival state.

  3. Implement admin commands and the PDC-backed Dragon Egg + Nether Star revival-book flow.

  4. Register listeners and commands in the main plugin class.

Created ApsCore from scratch with:

  • Paper 1.21.11 Gradle project configuration and plugin metadata.

  • Persistent UUID-based lives and elimination data in players.yml.

  • Three-life death system with permanent elimination and reconnect protection.

  • Admin commands:

    • /aps revive <player>

    • /aps eliminate <player>

    • /aps lives <player>

    • /aps setlives <player> <amount>

    • /aps reload

  • Dragon Egg + Nether Star revival-book creation.

  • PDC-bound Revival Books that cannot be forged by renaming normal books.

  • Enchanted-glint book appearance and target validation.

  • One-time revival consumption and life restoration.

  • Configurable messages, starting lives, and revival lives.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 721
src/main/java/com/apscore/ApsCore.java
package com.apscore;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class ApsCore extends JavaPlugin {
    private LifeManager lifeManager;

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

        lifeManager = new LifeManager(this);
        lifeManager.load();

        ApsListener listener = new ApsListener(this, lifeManager);
        Bukkit.getPluginManager().registerEvents(listener, this);

        ApsCommand command = new ApsCommand(this, lifeManager);
        PluginCommand apsCommand = getCommand("aps");
        if (apsCommand != null) {
            apsCommand.setExecutor(command);
            apsCommand.setTabCompleter(command);
        }
    }

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

    public String message(String path, String... replacements) {
        String prefix = getConfig().getString("messages.prefix", "");
        String value = getConfig().getString(path, path);
        value = value.replace("%prefix%", prefix);
        for (int index = 0; index + 1 < replacements.length; index += 2) {
            value = value.replace(replacements[index], replacements[index + 1]);
        }
        return ChatColor.translateAlternateColorCodes('&', value);
    }

    public LifeManager getLifeManager() {
        return lifeManager;
    }
}