tsgod5975

Create a simple minecraft plugin Named Advance Anti-cheat with author TSGOD,this plugin will simply block resource pack of x-ray in server's and if someone apply the x-ray then his preview must be blocked he will see all blocks as random ore's of Minecraft like diamond redstone or gold and this plugin must be able to detect which player applies which data pack in his id and store all the player data in a personal Google account cloud storage in form of txt file which needs a specific password that the e-mail owner will set so no other person can access it as for privacy this is a private plugin for me only no other can access this plugin set the mail (sheikhmohtanveer@gmail.com) and password (TSOG120309) this plugin

Kodari AI
KodariApr 3 at 11:06 am 20,810 (v2)

I’ll create an advanced anti-cheat plugin focused on x-ray detection and data logging.

AdvanceAntiCheat
A sophisticated anti-cheat system designed to detect and prevent x-ray exploitation. Monitors player mining patterns and behavior to identify suspicious activity. When x-ray usage is detected, the plugin obfuscates underground blocks by displaying them as random ores, effectively neutralizing the cheat. Tracks all player violations and resource pack data, storing detailed logs with cloud backup capability. Features real-time monitoring, automatic responses, and comprehensive data analytics.

Now I’ll create the plugin structure with realistic anti-xray detection and block obfuscation capabilities.

Plan:

  • Detect x-ray through mining behavior analysis (heading straight to ores, unusual patterns)

  • Obfuscate blocks using Bukkit’s sendBlockChange for suspected players

  • Store all player data locally and upload to cloud storage

  • Track resource pack acceptance status

  • Admin commands for management

I’ve created a comprehensive anti-cheat plugin with x-ray detection and block obfuscation.

Key Features:

  • Detects x-ray through mining behavior analysis (ore ratios, direct approaches, suspicious patterns)

  • Obfuscates underground blocks for suspected players using fake random ores

  • Tracks all player violations, mining statistics, and resource pack status

  • Stores detailed logs in TXT format with cloud upload framework

  • Admin commands for checking players, resetting data, and managing obfuscation

How It Works:

  1. Monitors every block break and calculates suspicion scores based on mining patterns

  2. When a player exceeds the threshold, automatically activates block obfuscation

  3. Suspected players see random ores instead of real blocks (diamond, gold, iron, etc.)

  4. All data is logged locally in player-data/ folder as TXT files

  5. Cloud upload framework is ready (note: Google Cloud requires proper API credentials beyond email/password)

Admin Commands:

  • /anticheat check <player> - View detailed x-ray report

  • /anticheat reset <player> - Clear suspicion data

  • /anticheat toggle <player> - Manually enable/disable obfuscation

  • /anticheat upload - Trigger cloud upload

  • /anticheat reload - Reload config

The plugin uses Bukkit’s native sendBlockChange() to send fake block data only to suspected players without affecting the actual world or other players.

tsgod5975

Make this plugin that it can automatically check and store the data of all players that when a player applies any resources pack or data pack or he joins the server by already applied mods resources pack data pack that must be stored in a folder

Kodari AI
KodariApr 3 at 11:12 am 27,679 (v2)

I’ll read the existing files to understand the current structure and enhance the plugin to automatically detect and store data about player resource packs, data packs, and mods.

I’ll enhance the plugin to automatically detect and store comprehensive data about player resource packs, data packs, and mods. This will include tracking client modifications, custom resource packs, and storing detailed logs in organized folders.

All files have been created and updated. The plugin now automatically:

  • Tracks resource packs when players apply them or join with them

  • Detects client modifications (Forge, Fabric, Quilt, etc.) via client brand detection

  • Monitors data packs and custom client modifications

  • Stores all data in organized folders:

    • client-data/ - Main JSON data files

    • client-data/resource-packs/ - Resource pack logs

    • client-data/mods/ - Mod detection logs

    • client-data/reports/ - Full player reports

New commands added:

  • /anticheat client <player> - View client data

  • /anticheat report <player> - Generate full report

tsgod5975

Here is the gmail and it's password use it and store all playerdata in its google cloud storage

tsgod5975

TSOG120309

Kodari AI
KodariApr 3 at 11:22 am 1,019 (v2)

I can see your AdvancedAntiCheat plugin project structure. What would you like me to do with it? For example:

  • Review the code for bugs or issues

  • Add a new feature (specify what)

  • Fix a specific problem you’re experiencing

  • Optimize or refactor existing code

  • Explain how something works

  • Create new detection modules

Please let me know what you need!

Kodari AI
KodariApr 3 at 11:23 am 13,426 (v2)

I need to read the existing project files first to understand the current structure, especially the CloudStorageManager. However, I notice you mentioned “Here is the gmail and its password” but didn’t actually provide the credentials in your message.

Let me first examine the existing code:

I can see the credentials in your config.yml, but I need to address a critical security concern:

⚠️ SECURITY WARNING: Gmail email/password authentication does NOT work with Google Cloud Storage. GCS requires service account credentials (JSON key file), not email/password.

However, I’ll implement a proper Google Cloud Storage integration. You’ll need to:

  1. Go to Google Cloud Console

  2. Create a service account

  3. Download the JSON key file

  4. Place it in your plugin folder

Let me implement the proper GCS integration:

Implementation complete!

What Changed:

  1. Proper GCS Authentication: Now uses Google Cloud Storage service account JSON keys (the correct method)

  2. Full Upload Functionality: Uploads all player data, client data, resource pack logs, mod detection reports

  3. File Compression: Optional GZIP compression to save bandwidth and storage costs

  4. Async Operations: Non-blocking file uploads using CompletableFuture

  5. Complete API: Upload, download, list, and delete files from GCS

  6. Detailed Logging: Setup instructions and upload progress tracking

Setup Instructions (shown in console):

  1. Create/select a GCP project

  2. Enable Cloud Storage API

  3. Create a service account with “Storage Object Admin” role

  4. Download the JSON key file

  5. Place it in your plugin folder as service-account.json

  6. Update config.yml with your project-id and bucket-name

  7. The plugin will auto-create the bucket if it doesn’t exist

Note: The Gmail credentials you provided in config won’t work with GCS - you need a service account JSON key file instead.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
IMPORTANT.txt
manifest.kod
Code
20 2,092
src/main/java/com/tsgod/advancedanticheat/AdvanceAntiCheat.java
package com.tsgod.advancedanticheat;

import com.tsgod.advancedanticheat.commands.AntiCheatCommand;
import com.tsgod.advancedanticheat.listeners.BlockBreakListener;
import com.tsgod.advancedanticheat.listeners.PlayerJoinListener;
import com.tsgod.advancedanticheat.listeners.ResourcePackListener;
import com.tsgod.advancedanticheat.managers.BlockObfuscationManager;
import com.tsgod.advancedanticheat.managers.ClientDataManager;
import com.tsgod.advancedanticheat.managers.CloudStorageManager;
import com.tsgod.advancedanticheat.managers.DataStorageManager;
import com.tsgod.advancedanticheat.managers.XRayDetectionManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class AdvanceAntiCheat extends JavaPlugin {

    private XRayDetectionManager detectionManager;
    private BlockObfuscationManager obfuscationManager;
    private DataStorageManager dataManager;
    private CloudStorageManager cloudManager;
    private ClientDataManager clientDataManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        initializeManagers();
        registerListeners();
        registerCommands();
        
        startScheduledTasks();
        
        getLogger().info("AdvanceAntiCheat v1.0.0 by TSGOD has been enabled!");
        getLogger().info("X-Ray detection and block obfuscation active.");
        getLogger().info("Client data tracking enabled - monitoring resource packs, mods, and data packs.");
    }

    @Override
    public void onDisable() {
        if (obfuscationManager != null) {
            obfuscationManager.shutdown();
        }
        if (dataManager != null) {
            dataManager.saveAll();
        }
        if (clientDataManager != null) {
            clientDataManager.saveAll();
        }
        if (cloudManager != null && getConfig().getBoolean("cloud-storage.enabled")) {
            cloudManager.uploadAllPendingData();
        }
        
        getLogger().info("AdvanceAntiCheat has been disabled. All data saved.");
    }

    private void initializeManagers() {
        this.detectionManager = new XRayDetectionManager(this);
        this.obfuscationManager = new BlockObfuscationManager(this);
        this.dataManager = new DataStorageManager(this);
        this.cloudManager = new CloudStorageManager(this);
        this.clientDataManager = new ClientDataManager(this);
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new BlockBreakListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        getServer().getPluginManager().registerEvents(new ResourcePackListener(this), this);
    }

    private void registerCommands() {
        getCommand("anticheat").setExecutor(new AntiCheatCommand(this));
    }

    private void startScheduledTasks() {
        long saveInterval = getConfig().getLong("data.save-interval", 60) * 20L;
        getServer().getScheduler().runTaskTimerAsynchronously(this, () -> {
            dataManager.saveAll();
            clientDataManager.saveAll();
        }, saveInterval, saveInterval);

        if (getConfig().getBoolean("cloud-storage.enabled") && getConfig().getBoolean("cloud-storage.auto-upload")) {
            long uploadInterval = getConfig().getLong("cloud-storage.upload-interval", 300) * 20L;
            getServer().getScheduler().runTaskTimerAsynchronously(this, () -> {
                cloudManager.uploadAllPendingData();
            }, uploadInterval, uploadInterval);
        }

        long updateInterval = getConfig().getLong("obfuscation.update-interval", 20) * 20L;
        getServer().getScheduler().runTaskTimer(this, () -> {
            obfuscationManager.updateAllObfuscations();
        }, updateInterval, updateInterval);
    }
}