Faisal Imran
๐Ÿ“Ž 1 file 2,007 chars
๐Ÿ“„
pasted-code-1793702587669.txt
txt 28 lines
โ–ถ
Act as an expert Minecraft Paper plugin developer. Write a complete, fully implemented Java plugin for Paper 1.21.11 using Java 21. 

Plugin Specifications:
Command: /domainexpand InfiniteRoast
When executed, it targets the player the caster is looking at (within 30 blocks). If no target is found, it targets the nearest player within 15 blocks.
It captures the target player and the caster inside a "Domain".

The Domain Structure:
Instantly generates a hollow sphere with a radius of 8 blocks, centered at the target player's location.
The sphere must be made of Unbreakable Black Concrete.
Store the original blocks that were replaced in a Map so they can be perfectly restored when the domain closes.
Prevent the trapped players from breaking the walls or escaping.

The "Infinite Roast" Effect:
While inside, the target player is anchored/slowed so they cannot easily run around.
Every 0.5 seconds (10 ticks), spawn a piece of floating text (TextDisplay entity) at a random location inside the sphere, slightly above the target's head level.
The TextDisplay should show a funny, creative internet/gaming roast aimed at the player (e.g., "Bro misses his water buckets," "Your building skills look like a creeper blew up mid-air," "L + Ratio + No Netherite").
Cycle through or randomly pull from a list of at least 15 pre-defined roasts.
Make the text face the target player.

Cleanup & Closure:
After exactly 30 seconds (600 ticks), the domain closes.
All generated TextDisplay entities must be deleted/killed.
The original blocks that were replaced by the black concrete must be fully restored instantly.
Teleport the players back safely if they somehow glitch into the walls during restoration.

Please provide the full plugin structure, including the paper-plugin.yml, the Main class, and the Command/Domain logic handler class. Use modern Paper 1.21.11 API methods
(avoid deprecated Bukkit alternatives). Make sure to use the new TextDisplay entity for the floating text.
Kodari AI
KodariNov 3 at 10:45 am 2
InfiniteRoastDomain
A Minecraft Paper plugin that traps a targeted player and the caster inside a hollow sphere of unbreakable black concrete. The domain generates instantly, stores replaced blocks for perfect restoration, and prevents escape. While trapped, the target is slowed while humorous TextDisplay entities spawn every 0.5 seconds showing creative internet roasts that face the player. After 30 seconds, all text displays are removed, blocks are restored, and players are safely teleported out. Uses modern Paper 1.21.11 APIs including TextDisplay entities and Adventure components.
  1. Add the Paper plugin descriptor and register /domainexpand InfiniteRoast.

  2. Build the domain, protect its walls, and run the roast displays.

  3. Restore the original blocks and clean up when the domain closes or the plugin stops.

Created the Paper plugin with /domainexpand InfiniteRoast, protected domain walls, floating roasts, and block restoration after 30 seconds.

The domain also closes early if a participant disconnects or the plugin is disabled. Recovery after a server crash is not persisted.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
5 348
src/main/java/com/kodari/infiniteroast/InfiniteRoastPlugin.java
package com.kodari.infiniteroast;

import com.mojang.brigadier.Command;
import io.papermc.paper.command.brigadier.Commands;
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public final class InfiniteRoastPlugin extends JavaPlugin {
    private DomainHandler domains;

    @Override
    public void onEnable() {
        domains = new DomainHandler(this);
        getServer().getPluginManager().registerEvents(domains, this);
        getLifecycleManager().registerEventHandler(LifecycleEvents.COMMANDS, event ->
            event.registrar().register(Commands.literal("domainexpand")
                .then(Commands.literal("InfiniteRoast").executes(context -> {
                    if (!(context.getSource().getSender() instanceof Player player)) {
                        context.getSource().getSender().sendMessage("Only players can expand a domain.");
                        return 0;
                    }
                    return domains.expand(player) ? Command.SINGLE_SUCCESS : 0;
                })).build())
        );
    }

    @Override
    public void onDisable() {
        if (domains != null) {
            domains.closeAll();
        }
    }
}