chasedangertv

Can you make a plugin that after every players death it records it in a INVENTORY GUI called /naked. But, I want the plugin to check every players death to see if they had any armor in their inventory or on them to basically prevent any naked killing, and if it does happen, I want ti to show inside of the INVENTORY GUI with the person who died, and the person who killed them. Let me know exactly what to do after you made it.

Kodari AI
KodariApr 14 at 1:26 am 10,707 (v2)

I’ll create a plugin that tracks “naked deaths” (players who died without any armor) and displays them in a GUI.

NakedDeaths
Tracks and records player deaths where the victim had no armor equipped or in their inventory. Records include both the victim and killer, displayed in an interactive GUI accessible via /naked command. Prevents naked killing by monitoring all death events and checking for armor presence in equipment slots and inventory. Features persistent death records and an intuitive browse interface.

Plugin created successfully! Here’s what the plugin does and how to use it:

🎯 What It Does

NakedDeaths tracks player deaths where the victim had zero armor (no helmet, chestplate, leggings, or boots) either equipped OR in their inventory. Each death records:

  • Victim’s name

  • Killer’s name (or “Environment” for non-PvP deaths)

  • Exact timestamp

  • Sequential death number

📋 How To Use

1. Build the Plugin

Shell
./gradlew build

The compiled .jar file will be in build/libs/

2. Install

  • Drop NakedDeaths-1.0.0.jar into your server’s plugins/ folder

  • Restart your server

3. In-Game Usage

View Naked Deaths:

Plain Text
/naked

Opens a chest GUI showing all recorded naked deaths (most recent first). Each death is displayed as a bone item with:

  • Death number

  • Victim name

  • Killer name

  • Timestamp

  • “This player had no armor!” indicator

Info Panel: Bottom-right corner shows total naked death count and explanation.

4. How It Works

When a player dies, the plugin:

  1. ✅ Checks all 4 armor slots (helmet, chest, legs, boots)

  2. ✅ Scans entire inventory for any armor pieces

  3. ❌ If ANY armor is found → death is NOT recorded

  4. ✅ If NO armor anywhere → death is RECORDED and viewable in /naked

5. Permissions

  • nakeddeaths.view - Access to /naked command (default: everyone)


The plugin is ready to use! Just compile and drop it on your server. Players can now use /naked to see who’s been caught dying without armor protection.

chasedangertv

Can you make it so I can delete stuff after handling it? Like I can click on it, tp to the location of death, and also be able to delete it from /naked

Kodari AI
KodariApr 14 at 1:37 am 6,704 (v2)

I’ll read all the existing files to understand the current structure and then add the teleport and delete functionality.

I’ll add teleport and delete functionality to the death records. Left-click will teleport to death location, and shift-click will delete the record.

Done! I’ve added teleport and delete functionality:

  • Left Click: Teleports you to the death location

  • Right Click: Shows coordinates in chat

  • Shift Click: Deletes the death record

  • Death records now store the location where the player died

  • The GUI refreshes automatically after deleting a record

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
13 555
src/main/java/com/nakeddeaths/NakedDeaths.java
package com.nakeddeaths;

import com.nakeddeaths.command.NakedCommand;
import com.nakeddeaths.inventory.gui.GUIListener;
import com.nakeddeaths.inventory.gui.GUIManager;
import com.nakeddeaths.listener.DeathListener;
import com.nakeddeaths.manager.DeathRecordManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class NakedDeaths extends JavaPlugin {
    private DeathRecordManager deathRecordManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        this.deathRecordManager = new DeathRecordManager();
        this.guiManager = new GUIManager();

        Bukkit.getPluginManager().registerEvents(new DeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);

        this.getCommand("naked").setExecutor(new NakedCommand(this));

        getLogger().info("NakedDeaths enabled! Use /naked to view naked death records.");
    }

    @Override
    public void onDisable() {
        getLogger().info("NakedDeaths disabled!");
    }
}