S

Make me a plugin that lets me select a area with "/bucasafezone wand" and it requires you to select 2 points.. left click is pos 1 and right-click is pos 2. and then if i do "/bucasafezone create name" after selecting 2 pos's. it should then create a safezone so non will not be able to grief, pvp, interact or pvp with anything in the selected zone. It should say a message that you cant interact there or anything based on what theyre trying to do, messages should be configurable. there should also be a "/bucasafezone reload" command that reloads the config and applies it to the server.

The plugin must require a specific license code in config.yml which is: A74J-908A-LLOK, if this code is not profied the plugin will disable.

Plugin Name: BucaSafeZone Author: ActualBuca

Kodari AI
KodariAug 9 at 2:11 pm 2
BucaSafeZone
A Bukkit/Spigot plugin that creates protected safe zones. Players select two points with a wand using left-click for position one and right-click for position two, then create a zone with /bucasafezone create name. Within zones, griefing, PvP, and block interaction are blocked with configurable warning messages. Includes /bucasafezone reload to apply config changes live. Requires license code A74J-908A-LLOK in config.yml; plugin disables if invalid. Uses a GUI framework for zone management and selection feedback.
  • Create the Maven project and plugin metadata.

  • Add configurable licensing, messages, and persisted safe-zone settings.

  • Implement wand-based two-point selection and zone creation/reload commands.

  • Add event protections for blocks, containers, entities, PvP, fluids, pistons, and explosions.

Created the Maven-based BucaSafeZone plugin.

Features included:

  • /bucasafezone wand

  • Left-click block for position 1

  • Right-click block for position 2

  • /bucasafezone create <name>

  • /bucasafezone reload

  • Persistent safe zones in config.yml

  • Configurable messages and wand settings

  • Protection against:

    • Block breaking and placing

    • PvP and entity damage

    • Container interaction

    • Entity interaction

    • Buckets and fluid flow

    • Pistons

    • Explosions

    • Fire and leaf decay

    • Hanging entity placement and breaking

  • Required license validation using A74J-908A-LLOK

  • Plugin disables automatically if the license is missing or invalid

  • Maven project setup with Spigot API and XSeries compatibility support

S

It doesnt let you select a safezone, it just breaks the block with the golden axe. it requires op to use the select tool tho. must act like the worldedit wand

Kodari AI
KodariAug 9 at 2:19 pm 1
  • Fix the selection wand so left/right clicks are intercepted before block breaking/placing.

  • Make wand use permission configurable, with OP/admin access by default.

  • Preserve WorldEdit-style selection behavior and ensure the command gives the correct tool.

Fixed the selection wand:

  • Left-click now sets position 1.

  • Right-click now sets position 2.

  • Both actions are cancelled before the block can break or be interacted with.

  • Wand detection now works based on the configured wand material, even if the display name is altered.

  • Selection works for operators through the existing bucasafezone.admin permission.

  • Event priority was raised so the wand behaves more like the WorldEdit selection wand.

  • Maven-only setup remains unchanged; no build.gradle was added.

S

Still have the same issue, also plugin must be for papermc 1.21.11 and not legacy. Just make it so when you left-click a block with the selection axe, instead of breaking it just gets placed back and sends in chat for you that you selected pos 1 at ... coords, same for right-click but if you right-click it just sends the msg. (THIS MSG IS NOT CONFIGURABLE)

Kodari AI
KodariAug 9 at 2:24 pm 1
  1. Make wand detection use the player’s main-hand item reliably on Paper 1.21.11.

  2. Cancel both interaction and break processing at the earliest event priority.

  3. Restore the original block on the next tick as a fallback, with the required non-configurable chat messages.

Fixed for PaperMC 1.21.11 using Maven only.

Changes:

  • Updated pom.xml to Paper API 1.21.11 and Java 21.

  • Added Paper API version to plugin.yml.

  • Selection wand now checks the player’s main hand reliably.

  • Operators can use the wand; the admin permission also remains supported.

  • Left-click:

    • Cancels block breaking immediately.

    • Selects position 1.

    • Sends: Selected position 1 at x, y, z.

  • Right-click:

    • Cancels interaction.

    • Selects position 2.

    • Sends: Selected position 2 at x, y, z.

  • Added a block restoration fallback if a block-break event still occurs.

  • Messages for position selection are hardcoded and are not configurable.

  • No build.gradle file was created.

S

Players cant pvp out of the zone, fix it.

Kodari AI
KodariAug 9 at 2:29 pm 1
  • Inspect the damage-protection logic and zone containment check.

  • Change PvP blocking so it only cancels when the combat location is inside a safe zone, while preserving other protections.

  • Keep the Maven/Paper 1.21.11 setup unchanged.

Fixed PvP protection so players can attack normally outside safe zones.

Damage is now cancelled only when the victim is inside a safe zone. Attacks from outside into a safe zone remain blocked, while players outside the zone can PvP freely. Maven and Paper 1.21.11 configuration were left unchanged.

S

Make it so OPS can still break blocks in safezones.

Kodari AI
KodariAug 9 at 3:07 pm 1
  • Update safe-zone block protection so operators bypass it.

  • Leave non-operator protection, PvP behavior, Maven setup, and configuration unchanged.

OPS can now break blocks inside safe zones. The selection wand behavior, non-OP protection, PvP, and Maven/Paper setup remain unchanged.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
12 779
src/main/java/com/actualbuca/bucasafezone/BucaSafeZonePlugin.java
package com.actualbuca.bucasafezone;

import com.actualbuca.bucasafezone.command.BucaSafeZoneCommand;
import com.actualbuca.bucasafezone.listener.SafeZoneListener;
import com.actualbuca.bucasafezone.manager.MessageManager;
import com.actualbuca.bucasafezone.manager.SelectionManager;
import com.actualbuca.bucasafezone.manager.ZoneManager;
import com.actualbuca.bucasafezone.service.WandService;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public class BucaSafeZonePlugin extends JavaPlugin {
    private ZoneManager zoneManager;
    private SelectionManager selectionManager;
    private MessageManager messageManager;
    private WandService wandService;

    @Override
    public void onEnable() {
        this.saveDefaultConfig();
        if (!this.isLicenseValid()) {
            this.getLogger().severe("Invalid or missing license code. BucaSafeZone is disabling.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        this.zoneManager = new ZoneManager(this);
        this.zoneManager.load();
        this.selectionManager = new SelectionManager();
        this.messageManager = new MessageManager(this);
        this.wandService = new WandService(this);
        BucaSafeZoneCommand command = new BucaSafeZoneCommand(this, this.messageManager, this.selectionManager, this.zoneManager, this.wandService);
        PluginCommand pluginCommand = this.getCommand("bucasafezone");
        if (pluginCommand != null) {
            pluginCommand.setExecutor(command);
            pluginCommand.setTabCompleter(command);
        }
        Bukkit.getPluginManager().registerEvents(new SafeZoneListener(this, this.zoneManager, this.selectionManager, this.messageManager, this.wandService), this);
    }

    public boolean reloadPlugin() {
        this.reloadConfig();
        if (!this.isLicenseValid()) {
            Bukkit.getPluginManager().disablePlugin(this);
            return false;
        }
        this.zoneManager.load();
        return true;
    }

    private boolean isLicenseValid() {
        return "A74J-908A-LLOK".equals(this.getConfig().getString("license", ""));
    }
}