qwertyydev

Create a Minecraft plugin named OuterKill for version 1.21+ that provides an external boundary protection system based on a WorldEdit selected region.

The plugin should work with WorldEdit selection.

Protection logic:

  • The protection applies only outside the selected region, not inside.
  • Add a configurable buffer distance outside the selected region. Default value is 10 blocks.
  • The buffer distance must be editable via config file.
  • If a player enters the protected external boundary zone, the player will be killed.
  • The killing protection feature must be toggleable using a command.
  • Protection system must be enabled by default.

Technical requirements:

  • Follow natural Minecraft plugin architecture.
  • Do not generate artificial or unnecessary complexity.
  • Do not include any comment lines inside the code.
  • Code must remain readable but professional.
  • Config file should be auto-generated.
  • Command system must be simple and stable.
  • If WorldEdit selection is missing, the plugin must not throw errors.
  • Use chunk-based optimization for performance.
  • Listen to player movement events efficiently.

Commands:

  • /okill toggle → Toggle killing protection system.
  • /okill reload → Reload the plugin

Performance Requirements:

  • Plugin must be optimized to minimize server lag and CPU usage.

Compatibility:

  • Minecraft 1.21+ server version.
Kodari AI
KodariFeb 28 at 7:45 pm 11,860 (v2)

I’ll create the OuterKill plugin with WorldEdit integration for external boundary protection.

OuterKill
External boundary protection system that kills players who enter a configurable buffer zone outside a WorldEdit selected region. Features toggleable protection, configurable buffer distance, efficient chunk-based optimization, and command-based control. Designed for server administrators who need to enforce boundary restrictions around protected areas without affecting players inside the safe zone.

Plugin created successfully! OuterKill provides external boundary protection with WorldEdit integration, configurable buffer zones, toggleable protection system, and efficient player movement monitoring.

qwertyydev

Update the existing OuterKill Minecraft plugin (1.21+) with the following changes:

Region Creation System:

  • After selecting two positions with WorldEdit, the region must be created using a command.
  • Do not allow custom names for regions.
  • Regions must automatically receive incremental numeric IDs.
  • The first created region should be ID 1, then 2, 3, 4, and so on.
  • IDs must auto-increment and never conflict with existing ones.
  • IDs must persist after server restart.

Commands:

  • /okill create → Creates a new protected region based on the current WorldEdit selection and assigns the next available numeric ID.
  • /okill remove <id> → Removes the region with the given numeric ID.
  • /okill list → Lists all existing region IDs.
  • /okill toggle → Enables or disables the kill protection system.
  • /okill reload → Reloads the configuration and stored regions.

Behavior Rules:

  • Protection applies only outside the selected region.
  • The outer buffer distance must remain configurable (default 10 blocks).
  • If a player enters the configured external boundary of any registered region, the player is instantly killed.
  • If WorldEdit selection is missing when using /okill create, the plugin must not throw errors and must respond safely.

Technical Requirements:

  • Maintain clean and natural plugin architecture.
  • Do not include comment lines in the code.
  • Use efficient movement checks.
  • Optimize region storage and lookups.
  • Regions must be saved to file and reloaded on startup.
  • Avoid unnecessary complexity.
  • Ensure full compatibility with Minecraft 1.21+.
Kodari AI
KodariFeb 28 at 8:41 pm 19,323 (v2)

I’ll analyze the existing plugin structure and implement the region creation system with auto-incremented numeric IDs.

Now I’ll implement the region creation system with auto-incremented numeric IDs and persistence.

Plan:

  1. Refactor ProtectionManager to use global numbered regions (1, 2, 3…) instead of player-specific regions

  2. Add regions.yml file for persistent storage with auto-incrementing ID tracking

  3. Update CommandHandler with create, remove, list commands

  4. Ensure all regions are checked for any player movement

All files have been updated with the new region creation system featuring auto-incremented numeric IDs, persistent storage, and the requested commands.

qwertyydev

Update the existing OuterKill Minecraft 1.21+ plugin with the following changes:

1) Remove Death Message Trigger

  • When a player enters the lethal outer boundary, they must die instantly.
  • Do NOT send any chat message when the player dies from the boundary.
  • No action bar, title, or chat output on death trigger.

2) Toggle Command Output

  • When using /okill toggle, the plugin must only send a single word in chat:

ENABLED or DISABLED

  • No prefixes, no colors, no extra text, no symbols.
  • The output must strictly be one of those two words.

3) Teleport Bypass Fix

  • Currently, players do not die if they teleport directly into the lethal outer boundary.
  • Fix this issue.
  • The kill check must also trigger on:

- PlayerTeleportEvent - PlayerJoinEvent (if they log in inside the lethal zone)

  • The system must not rely only on PlayerMoveEvent.
  • Any method of entering the lethal area (walking, teleporting, respawning, joining) must trigger instant death.

Technical Requirements:

  • Keep clean and natural plugin structure.
  • Do not add comment lines.
  • Maintain performance optimization.
  • Avoid unnecessary complexity.
  • Ensure full compatibility with Minecraft 1.21+ (Paper).
Kodari AI
KodariMar 1 at 6:15 am 10,568 (v2)

I’ll read the project files to understand the current implementation and make the necessary changes.

Now I’ll implement the required changes:

Changes completed:

  1. Death message removed - No chat/action bar/title output when killed by boundary

  2. Toggle output simplified - Returns only “ENABLED” or “DISABLED” with no colors or prefixes

  3. Teleport bypass fixed - Added handlers for PlayerTeleportEvent and PlayerJoinEvent, ensuring instant death regardless of how players enter the lethal zone

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 567
src/main/java/dev/qwerty/outerkill/OuterKill.java
package dev.qwerty.outerkill;

import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class OuterKill extends JavaPlugin {

    private ConfigManager configManager;
    private ProtectionManager protectionManager;
    private CommandHandler commandHandler;
    private MovementListener movementListener;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.protectionManager = new ProtectionManager(this);
        this.commandHandler = new CommandHandler(this);
        this.movementListener = new MovementListener(this);

        getCommand("okill").setExecutor(commandHandler);
        getServer().getPluginManager().registerEvents(movementListener, this);

        getLogger().info("OuterKill v1.0.0 has been enabled");
        getLogger().info("Protection status: " + (configManager.isProtectionEnabled() ? "ENABLED" : "DISABLED"));
    }

    @Override
    public void onDisable() {
        getLogger().info("OuterKill has been disabled");
    }

    public void reload() {
        configManager.reload();
        protectionManager.reload();
        getLogger().info("OuterKill configuration reloaded");
    }
}