ayanxd07

Plugin name will be AYANXD07_RECORDING AND GIVE CREDIT TO AYANXD07 IN CONFIG AND IT CANT Be CHANGED Create a production-ready Minecraft Paper plugin for Minecraft Java Edition 1.21.11 that adds a custom recording/replay system inspired by advanced SMP recording features.

Technology

  • Minecraft: Java Edition 1.21.11
  • Server: Paper
  • Language: Java
  • Use the appropriate Paper API for 1.21.11.
  • Use Maven for dependency management.

Recording system

  • "/record start" — start recording for the player.
  • "/record stop" — stop the recording.
  • "/record status" — show recording status.
  • "/record list" — list the player's recordings.
  • "/record delete <id>" — delete a recording.
  • "/record view <id>" — allow authorized users to inspect a recording.
  • Automatically stop/save a recording when the player disconnects.
  • Give every recording a unique ID, start time, end time, player UUID, and server/world information.

Events to record Record important gameplay data efficiently, including:

  • Player position and rotation
  • Movement
  • Sprinting/sneaking
  • Jumping
  • Attacks and damage
  • Kills and deaths
  • Block placement/breaking
  • Item pickups/drops
  • Inventory changes
  • Item use
  • Chat messages
  • Commands
  • Teleports
  • World changes
  • Relevant entity interactions

Do NOT record unnecessary data every tick if it can be compressed or represented more efficiently.

Storage

  • Store recordings efficiently on disk.
  • Use a suitable format such as JSON for development/debugging and a compact binary format for production.
  • Include configurable storage limits.
  • Automatically remove recordings older than a configurable number of days.
  • Prevent corrupted recordings from crashing the server.
  • Never expose recordings to unauthorized players.

Permissions Create:

  • "recording.use"
  • "recording.view"
  • "recording.admin"

Configuration Create a detailed "config.yml" containing:

  • Recording enabled/disabled
  • Maximum recording duration
  • Storage directory
  • Maximum storage size
  • Automatic cleanup
  • Event toggles
  • Compression settings
  • Permission settings
  • Custom messages

Performance

  • Optimize for SMP servers with many players.
  • Avoid blocking the main server thread with file I/O.
  • Use asynchronous saving where safe.
  • Minimize memory usage.
  • Batch/compress recording data where appropriate.
  • Never allow the recording system to significantly affect TPS.

Architecture Use clean, modular Java classes such as:

  • "RecordingPlugin"
  • "RecordingManager"
  • "RecordingSession"
  • "RecordingEvent"
  • "RecordingStorage"
  • "RecordingCommand"
  • "RecordingListener"
  • "RecordingConfig"

Use interfaces where useful so the storage/replay system can be replaced later.

Important limitation A normal Paper server plugin cannot directly capture the player's actual screen/video. This plugin should therefore record server-side gameplay state/events, similar to replay data.

If actual video recording is desired later, design the API so a client-side mod or external recording application can integrate with it.

Deliverables Provide:

  1. Complete Java source code.
  2. "plugin.yml".
  3. "config.yml".
  4. "pom.xml".
  5. Complete project folder structure.
  6. Build instructions.
  7. Installation instructions.
  8. Commands and permissions documentation.
  9. Explanation of the recording data format.
  10. Make sure the code is compatible with Paper 1.21.11 and does not use deprecated or incompatible APIs.
Kodari AI
KodariSep 22 at 5:20 am 3
AYANXD07Recording
A comprehensive server-side gameplay recording and replay system for Paper 1.21.11 SMP servers. Features include per-player recording sessions with start/stop/status/list/delete/view commands, automatic session termination on disconnect, and efficient event capture covering movement, combat, block interactions, inventory changes, chat, and commands. Uses async file I/O with JSON for debugging and compact binary format for production, configurable storage limits and auto-cleanup, permission-based access control, and a modular architecture with interfaces for future replay system expansion. Optimized for high-player-count servers with minimal TPS impact.
  1. Create the Maven Paper 1.21.11 project and fixed AYANXD07 attribution.

  2. Implement recording sessions, event capture, efficient compressed storage, cleanup, and async I/O.

  3. Add commands, permissions, configuration, plugin metadata, and operational documentation.

Created the complete Maven Paper plugin project for AYANXD07_RECORDING.

Project structure

Plain Text
.
├── pom.xml
├── README.md
└── src
    └── main
        ├── java/com/ayanxd07/recording
        │   ├── RecordingPlugin.java
        │   ├── command/RecordingCommand.java
        │   ├── config/RecordingConfig.java
        │   ├── listener/RecordingListener.java
        │   ├── manager/RecordingManager.java
        │   ├── model
        │   │   ├── RecordingData.java
        │   │   ├── RecordingEvent.java
        │   │   ├── RecordingStatus.java
        │   │   └── RecordingSummary.java
        │   ├── session/RecordingSession.java
        │   └── storage/RecordingStorage.java
        └── resources
            ├── config.yml
            └── plugin.yml

Implemented:

  • /record start

  • /record stop

  • /record status

  • /record list

  • /record delete <id>

  • /record view <id>

  • Automatic save on player disconnect

  • Maximum recording duration

  • Movement sampling and rotation compression

  • Combat, kills, deaths, blocks, items, inventory, chat, commands, teleports, world changes, interactions, sprinting, sneaking, jumping, and item use

  • Asynchronous disk storage

  • Versioned binary .rec format

  • Optional GZIP compression

  • Atomic file writes

  • Corruption handling

  • Maximum storage size enforcement

  • Automatic age-based cleanup

  • Permission protection

  • Configurable event toggles and messages

  • Fixed AYANXD07 attribution in plugin metadata, logging, and configuration

  • API boundaries suitable for future client-mod or external replay integrations

Build with:

Shell
mvn clean package

Output:

Plain Text
target/AYANXD07_RECORDING-1.0.0.jar

The plugin records server-side gameplay data only. It does not capture actual player screen video.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
15 1,354
src/main/java/com/ayanxd07/recording/RecordingPlugin.java
package com.ayanxd07.recording;

import com.ayanxd07.recording.command.RecordingCommand;
import com.ayanxd07.recording.config.RecordingConfig;
import com.ayanxd07.recording.listener.RecordingListener;
import com.ayanxd07.recording.manager.RecordingManager;
import com.ayanxd07.recording.storage.RecordingStorage;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.nio.file.Path;

public final class RecordingPlugin extends JavaPlugin {
    public static final String CREDIT = "AYANXD07";

    private RecordingConfig recordingConfig;
    private RecordingStorage recordingStorage;
    private RecordingManager recordingManager;

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

        this.recordingConfig = new RecordingConfig(getConfig());
        Path storageDirectory = recordingConfig.storageDirectory(getDataFolder().toPath());
        this.recordingStorage = new RecordingStorage(
                this,
                storageDirectory,
                recordingConfig.maxStorageBytes(),
                recordingConfig.cleanupEnabled(),
                recordingConfig.cleanupOlderThanDays(),
                recordingConfig.compressionEnabled()
        );
        this.recordingManager = new RecordingManager(this, recordingConfig, recordingStorage);

        Bukkit.getPluginManager().registerEvents(new RecordingListener(recordingManager), this);
        PluginCommand command = getCommand("record");
        if (command == null) {
            getLogger().severe("The record command is missing from plugin.yml.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        RecordingCommand recordingCommand = new RecordingCommand(this, recordingManager, recordingConfig);
        command.setExecutor(recordingCommand);
        command.setTabCompleter(recordingCommand);
        getLogger().info("AYANXD07_RECORDING enabled. Server-side gameplay capture is active.");
    }

    @Override
    public void onDisable() {
        if (recordingManager != null) {
            recordingManager.stopAll();
        }
        if (recordingStorage != null) {
            recordingStorage.shutdown();
        }
    }
}