Brody Blind

Create a Minecraft plugin for Paper 1.21.11 using Java 21 that allows administrators to send fake Minecraft death messages that look exactly like genuine vanilla Minecraft death messages in chat.

Main Feature

Add a command:

/fakedeathmessage <player> <killer>

This command should send a fake death message to the server using the exact same formatting, color, and wording that Minecraft normally uses when a player dies to another player.

Example command: /fakedeathmessage Steve Alex

Example chat output:

Steve was slain by Alex

The message must look identical to a real Minecraft death message, making it suitable for scripted Minecraft videos, roleplay, and cinematic scenes.

Death Message Requirements

Reproduce the exact vanilla Minecraft death message for the specified killer and victim.

Use the server's normal chat formatting for death messages.

Do not add any prefix, plugin name, extra text, special symbols, or visual indicators.

Do not actually kill the victim.

Do not damage, teleport, disconnect, or otherwise affect either player.

Do not modify anyone's inventory, health, experience, statistics, or game state.

The fake death message must be broadcast to all online players who would normally receive server death messages.

Support offline or nonexistent victim names as text, so I can create scripted deaths for characters who are not currently online.

Support custom player names without requiring the named victim to be online.

Death Message Variations

Implement vanilla-style messages for different causes of death, including:

Player slain by another player.

Player slain by another player using a weapon with a custom name.

Player shot by a player using a bow or crossbow.

Player killed by an explosion caused by another player.

Player killed by a named weapon or item.

Allow the command to select a death-message type if practical, while keeping the simple two-argument command as the default.

Command Format

Primary command:

/fakedeathmessage <victim> <killer>

Optional advanced syntax:

/fakedeathmessage <victim> <killer> <death-type>

Examples:

/fakedeathmessage Steve Alex

/fakedeathmessage Steve Alex bow

/fakedeathmessage Steve Alex explosion

The default command must always produce the standard player-versus-player death message.

Kodari AI
KodariOct 15 at 2:07 am 1
FakeDeathMessage
Creates a Paper 1.21.11 plugin with a /fakedeathmessage command that broadcasts authentic vanilla-style Minecraft death messages to all online players. Supports multiple death types including slain, bow/crossbow kills, explosions, and named weapons. Does not affect player game state, health, inventory, or statistics. Works with offline or nonexistent player names for scripted cinematic scenes. Uses MiniMessage formatting to replicate exact vanilla death message appearance with no plugin prefixes or visual indicators.

I’ll create the Paper plugin with a vanilla-translated death message, a default PvP command, and optional bow, explosion, and named-weapon variants.

Created the Paper 1.21.11 plugin. It broadcasts client-localized vanilla death-message components without changing either player’s game state; victim and killer names can be offline or fictional.

  • /fakedeathmessage Steve Alex — standard PvP message

  • /fakedeathmessage Steve Alex bow

  • /fakedeathmessage Steve Alex explosion

  • /fakedeathmessage Steve Alex item Custom Sword — named-weapon variant

The command requires the fakedeathmessage.send permission, granted to operators by default.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
4 107
src/main/java/com/example/fakedeathmessage/FakeDeathMessagePlugin.java
package com.example.fakedeathmessage;

import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.TextDecoration;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Locale;
import java.util.Map;

public final class FakeDeathMessagePlugin extends JavaPlugin {
    private static final Map<String, String> DEATH_TYPES = Map.of(
            "player", "death.attack.player",
            "bow", "death.attack.arrow",
            "explosion", "death.attack.explosion.player",
            "item", "death.attack.player.item"
    );

    @Override
    public void onEnable() {
        PluginCommand command = getCommand("fakedeathmessage");
        if (command != null) {
            command.setExecutor(this::executeFakeDeathMessage);
        }
    }

    private boolean executeFakeDeathMessage(CommandSender sender, Command command, String label, String[] args) {
        if (args.length < 2) {
            return false;
        }

        String victim = args[0];
        String killer = args[1];
        String type = args.length >= 3 ? args[2].toLowerCase(Locale.ROOT) : "player";
        String translationKey = DEATH_TYPES.get(type);
        if (translationKey == null) {
            sender.sendMessage("Unknown death type. Use player, bow, explosion, or item.");
            return true;
        }

        String weaponName = args.length >= 4 ? String.join(" ", java.util.Arrays.copyOfRange(args, 3, args.length)) : null;
        if (type.equals("item") && (weaponName == null || weaponName.isBlank())) {
            sender.sendMessage("The item type requires a weapon name.");
            return true;
        }
        if (weaponName != null && !weaponName.isBlank() && !translationKey.endsWith(".item")) {
            translationKey += ".item";
        }

        Component message = weaponName != null && !weaponName.isBlank()
                ? Component.translatable(
                        translationKey,
                        Component.text(victim),
                        Component.text(killer),
                        Component.text(weaponName).color(NamedTextColor.WHITE).decorate(TextDecoration.ITALIC)
                )
                : Component.translatable(translationKey, Component.text(victim), Component.text(killer));
        message = message.color(NamedTextColor.GRAY);

        Component finalMessage = message;
        Bukkit.getOnlinePlayers().forEach(player -> player.sendMessage(finalMessage));
        return true;
    }
}