actualbuca

Make me a plugin that allows players to choose blocks that players cannot see unless it’s in their render distance. If they cannot see it from where they are looking, the chosen blocks must turn into AIR till the player actually sees them. This should be client sided aswell.

Kodari AI
KodariMay 7 at 7:37 am 8,989 (v2)

I’ll create a plugin that hides specific blocks client-side until they’re actually visible from the player’s view direction and render distance.

BlockVisibility
A client-sided block visibility plugin that hides configured blocks until they enter the player's render distance and line of sight. Players can select which block types should be hidden, and blocks dynamically appear/disappear based on view direction and distance. Uses packet manipulation for seamless client-side rendering without affecting server blocks. Includes configurable render distances, performance optimization, and per-player or global block selection modes.

Created BlockVisibility - a client-sided block visibility plugin using Maven. The plugin uses ProtocolLib to send fake block packets to clients, hiding configured blocks until they’re actually visible from the player’s view direction and within render distance. Players can add/remove blocks via commands, with configurable performance settings and both per-player and global modes.

actualbuca

It should be called AntiBlockEsp

Kodari AI
KodariMay 7 at 7:40 am 19,632 (v2)

I’ll rename the plugin to AntiBlockEsp and update all references throughout the project.

Now I’ll move and update all files to use the new name AntiBlockEsp:

The main class file still has the old name. Let me rename it and update all references:

Now I need to update the command reference in the main class and update permissions/messages:

Now I need to update the manager classes to use the new plugin class name:The imports were already auto-updated by the move. Let me check the other files:

Perfect! The move tag already updated all the imports and class references automatically. Now I need to add XSeries to the pom.xml since it’s being used:

Perfect! AntiBlockEsp plugin successfully renamed and configured. The plugin uses ProtocolLib to send client-side block change packets, hiding configured blocks (like GLASS, BARRIER, STRUCTURE_VOID) until they’re actually visible from the player’s view direction and within render distance. Players can manage hidden blocks with /abe add/remove/list/toggle commands, with both per-player and global configuration modes available.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
8 725
src/main/java/com/antiblockesp/AntiBlockEsp.java
package com.antiblockesp;

import com.antiblockesp.commands.BlockVisibilityCommand;
import com.antiblockesp.listeners.PlayerListener;
import com.antiblockesp.managers.ConfigManager;
import com.antiblockesp.managers.VisibilityManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class AntiBlockEsp extends JavaPlugin {

    private ConfigManager configManager;
    private VisibilityManager visibilityManager;

    @Override
    public void onEnable() {
        if (!getServer().getPluginManager().isPluginEnabled("ProtocolLib")) {
            getLogger().severe("ProtocolLib not found! This plugin requires ProtocolLib to function.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        this.configManager = new ConfigManager(this);
        this.visibilityManager = new VisibilityManager(this);

        getCommand("antiblockesp").setExecutor(new BlockVisibilityCommand(this));
        getServer().getPluginManager().registerEvents(new PlayerListener(this), this);

        visibilityManager.startUpdateTask();

        getLogger().info("AntiBlockEsp has been enabled!");
    }

    @Override
    public void onDisable() {
        if (visibilityManager != null) {
            visibilityManager.shutdown();
        }
        getLogger().info("AntiBlockEsp has been disabled!");
    }

    public void reload() {
        configManager.reload();
        visibilityManager.reload();
        getLogger().info("AntiBlockEsp configuration reloaded!");
    }
}