Needleveling Leveling

/claim

Kodari AI
KodariYesterday at 10:53 pm 2
NetherMobSpawnControl
A Minecraft NMS plugin for version 1.26.3 that provides advanced control over nether mob spawning. Features include custom spawn rate configuration, mob type filtering, region-based spawning restrictions, and real-time spawn event interception using NMS internals. Administrators can define spawn rules per world, adjust spawn weights for specific mobs, and monitor spawn activity through detailed logging. The plugin hooks directly into the server's spawning system to modify behavior without disrupting vanilla mechanics, offering both global and per-chunk spawning controls with a clean configuration interface.

I’ll create a chunk-claim plugin with /claim, /unclaim, and protection against other players building in claimed chunks. Claims will persist across restarts.

Created a chunk-claim plugin with /claim and /unclaim. Claims persist across restarts and block other players from building, using buckets, or interacting with blocks in claimed chunks.

Operators can bypass protection with chunkclaims.bypass.

Needleveling Leveling

A male Minecraft skin, Steve model, short neat white hair, bright blue eyes, pale skin, elegant white long coat/jacket with black accents and subtle black patterns on the chest and sleeves, black inner shirt, black pants, black shoes, clean and detailed pixel art style, cultivator / xianxia inspired, calm expression, high detail on the clothing folds and black trim

Kodari AI
KodariYesterday at 10:54 pm 1

This is a Paper plugin project; your request is for Minecraft skin art. To create textures, enable Kodari Studio in Settings → Generation, or enable it for all projects at https://kodari.ai/settings?tab=features.

Needleveling Leveling

A male Minecraft skin, Steve model, short neat white hair, bright blue eyes, pale skin, elegant white long coat/jacket with black accents and subtle black patterns on the chest and sleeves, black inner shirt, black pants, black shoes, clean and detailed pixel art style, cultivator / xianxia inspired, calm expression, high detail on the clothing folds and black trim

Kodari AI
KodariYesterday at 10:56 pm 7

Created the Steve-model skin at skins/white_cultivator.png.

Kodari can make mistakes. Review important code before using.
Files
skins
src
build.gradle
settings.gradle
Code
5 172
src/main/java/ai/kodari/chunkclaims/ChunkClaims.java
package ai.kodari.chunkclaims;

import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.player.PlayerBucketEmptyEvent;
import org.bukkit.event.player.PlayerBucketFillEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public final class ChunkClaims extends JavaPlugin implements Listener {
    private final Map<String, UUID> claims = new HashMap<>();
    private File claimsFile;

    @Override
    public void onEnable() {
        claimsFile = new File(getDataFolder(), "claims.yml");
        YamlConfiguration data = YamlConfiguration.loadConfiguration(claimsFile);
        for (String key : data.getKeys(false)) {
            try {
                claims.put(key, UUID.fromString(data.getString(key, "")));
            } catch (IllegalArgumentException ex) {
                getLogger().warning("Ignoring invalid claim owner for " + key);
            }
        }
        getServer().getPluginManager().registerEvents(this, this);
    }

    private String key(Chunk chunk) {
        return chunk.getWorld().getUID() + "_" + chunk.getX() + "_" + chunk.getZ();
    }

    private void saveClaims() {
        YamlConfiguration data = new YamlConfiguration();
        claims.forEach((key, owner) -> data.set(key, owner.toString()));
        try {
            data.save(claimsFile);
        } catch (IOException ex) {
            getLogger().severe("Could not save claims: " + ex.getMessage());
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("Only players can claim chunks.");
            return true;
        }
        String key = key(player.getLocation().getChunk());
        UUID owner = claims.get(key);
        if (command.getName().equalsIgnoreCase("claim")) {
            if (owner != null) {
                player.sendMessage(ChatColor.RED + (owner.equals(player.getUniqueId())
                        ? "You already own this chunk." : "This chunk is already claimed."));
                return true;
            }
            claims.put(key, player.getUniqueId());
            saveClaims();
            player.sendMessage(ChatColor.GREEN + "You claimed this chunk.");
        } else if (command.getName().equalsIgnoreCase("unclaim")) {
            if (owner == null) {
                player.sendMessage(ChatColor.RED + "This chunk is not claimed.");
            } else if (!owner.equals(player.getUniqueId()) && !player.hasPermission("chunkclaims.bypass")) {
                player.sendMessage(ChatColor.RED + "You do not own this chunk.");
            } else {
                claims.remove(key);
                saveClaims();
                player.sendMessage(ChatColor.GREEN + "This chunk is now unclaimed.");
            }
        }
        return true;
    }

    private boolean denied(Player player, Location location) {
        UUID owner = claims.get(key(location.getChunk()));
        return owner != null && !owner.equals(player.getUniqueId())
                && !player.hasPermission("chunkclaims.bypass");
    }

    @EventHandler(ignoreCancelled = true)
    public void onBreak(BlockBreakEvent event) {
        if (denied(event.getPlayer(), event.getBlock().getLocation())) {
            event.setCancelled(true);
        }
    }

    @EventHandler(ignoreCancelled = true)
    public void onPlace(BlockPlaceEvent event) {
        if (denied(event.getPlayer(), event.getBlock().getLocation())) {
            event.setCancelled(true);
        }
    }

    @EventHandler(ignoreCancelled = true)
    public void onBucketEmpty(PlayerBucketEmptyEvent event) {
        if (denied(event.getPlayer(), event.getBlock().getLocation())) {
            event.setCancelled(true);
        }
    }

    @EventHandler(ignoreCancelled = true)
    public void onBucketFill(PlayerBucketFillEvent event) {
        if (denied(event.getPlayer(), event.getBlockClicked().getLocation())) {
            event.setCancelled(true);
        }
    }

    @EventHandler(ignoreCancelled = true)
    public void onInteract(PlayerInteractEvent event) {
        Block block = event.getClickedBlock();
        if (event.getHand() == EquipmentSlot.HAND && block != null
                && event.getAction().isRightClick() && block.getType() != Material.AIR
                && denied(event.getPlayer(), block.getLocation())) {
            event.setCancelled(true);
        }
    }
}