pomm hom

Um, okay, now let's create a plugin. So basically the plugin is gonna protect chests of uh, peoples. So basically, um, when you have two choices to do, you can write your name in a sign or like write in a sign claim and it will automatically claim. And you can like add people that can uh, interact with the chest, uh, but they can't break it, and that work with any container, only uh, and just doesn't work with it because the end chests are already priv- private. Uh, or uh you claim like with the how or something like that, and when you click it will claim all the chests like they are near you, and you can only use that like maybe three times or four max, and write it else well in the config that how much uh, like people can claim. And that's it. and also make the protecte for the furnaces and blast furneces ect.. and make sure to make there is no way to steal from another way ( using hopper , tnt ect..) and if my free trial is over before u finish make sure to finish it before the free trial ends

Kodari AI
KodariOct 16 at 2:00 pm 2
ChestGuardian
A comprehensive chest protection plugin that secures containers, furnaces, and blast furnaces from theft and griefing. Players can claim blocks by placing a sign with "claim" and their name, or by using a claim wand that mass-claims nearby containers (limited uses configurable). Owners can add trusted players who can interact but not break protected blocks. Protection extends to hoppers, pistons, TNT explosions, and all other indirect access methods. Configurable claim limits and wand usage counts provide flexible server control. Features a GUI-based management system for adding/removing trusted players and viewing claim information.

I’ll create ChestGuard with:

  1. Sign-based and configurable hoe-based claiming, with per-player and bulk-use limits.

  2. Owner-only breaking and trusted-player inventory access across containers, including furnaces and hoppers.

  3. Protection against hopper transfers, explosions, fire, and piston movement, with saved claims and a trust command.

Created ChestGuard. Players can claim a container by placing a sign next to it with claim, [claim], [private], or their name on the first line. The configured hoe bulk-claims nearby unclaimed containers.

Owners can use /container trust <player> while looking at a claimed container to allow inventory access; trusted players still cannot break it. /container untrust <player>, /container trusted, and /container unclaim manage the claim.

config.yml sets the default limit to 64 claims per player, with bulk claims covering up to 4 containers per use and 4 uses per player. Claims and bulk-use counts are saved in data.yml. Protection covers containers such as furnaces and hoppers, and blocks hopper transfers, explosions, fire, and piston movement.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 769
src/main/java/com/kodari/chestguard/ChestGuardPlugin.java
package com.kodari.chestguard;

import com.kodari.chestguard.command.ContainerCommand;
import com.kodari.chestguard.protection.ProtectionManager;
import com.kodari.chestguard.protection.ProtectionListener;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;

public final class ChestGuardPlugin extends JavaPlugin {
    private ProtectionManager protectionManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        if (!new File(getDataFolder(), "data.yml").exists()) {
            saveResource("data.yml", false);
        }

        protectionManager = new ProtectionManager(this);
        Bukkit.getPluginManager().registerEvents(new ProtectionListener(this, protectionManager), this);

        ContainerCommand containerCommand = new ContainerCommand(this, protectionManager);
        getCommand("container").setExecutor(containerCommand);
        getCommand("container").setTabCompleter(containerCommand);
    }

    @Override
    public void onDisable() {
        if (protectionManager != null) {
            protectionManager.saveData();
        }
    }

    public void sendMessage(CommandSender sender, String message) {
        sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&8[&bChestGuard&8] &f" + message));
    }
}