originalTOXIC

i need a plugin that links my webstore to my server

Kodari AI
KodariMar 20 at 11:40 pm 14,303 (v2)

I’ll create a webstore integration plugin that allows your web store to deliver purchases to players automatically.

WebstoreLink
A robust webstore integration plugin that connects your online shop to your Minecraft server. Supports multiple delivery methods including JSON queue files and MySQL database. Features automatic command execution for purchases, offline player queue system, configurable purchase packages, and comprehensive admin tools. Includes transaction logging, purchase history, and support for placeholders. Works with any webstore that can write JSON data or connect to MySQL.

All files created! WebstoreLink is ready with JSON queue and MySQL support, automatic purchase delivery, command execution with placeholders, transaction logging, and admin commands for testing and viewing purchase history.

originalTOXIC

i want it to be like when some one buys something, something like this image will send in chat and a gg wave will start and last 15 seconds and when the player sends gg itll replace the message with a colorful GG and theyll be give 3 credits, in the initial purchase message itll say what package they bought and how much they spent

1 image attached
Kodari AI
KodariMar 20 at 11:46 pm 15,739 (v2)

I’ll help you implement a GG Wave system with purchase announcements. Let me first read the existing files to understand the current structure.

I’ll implement the GG Wave system with purchase announcements. This will add:

  • Purchase announcement messages

  • 15-second GG wave system

  • Credit rewards for saying “GG”

  • Colorful message formatting

Summary

I’ve implemented the GG Wave system with the following features:

What’s new:

  • Purchase announcements with colorful formatting showing player name, package, and amount spent

  • 15-second GG wave that starts automatically when someone makes a purchase

  • GG detection - when players type “gg” during a wave, their message is replaced with colorful “GG”

  • Credit rewards - players get 3 credits for saying GG (configurable)

  • One claim per wave - players can only claim rewards once per wave

  • Wave end announcement - broadcasts when the 15 seconds are up

Configuration options in config.yml:

  • gg-wave.enabled - toggle the system on/off

  • gg-wave.duration - wave duration in seconds (default: 15)

  • gg-wave.reward-credits - credits given (default: 3)

  • gg-wave.reward-command - command to run for rewards (supports Vault economy or custom commands)

  • Fully customizable messages with color codes

JSON format - Add "amount": 10.99 to your purchase JSON files to show the price in announcements.

originalTOXIC

the rank purchases are given through luckperms here are the ranks, $20 specialist, $12sentry, $6 defender, credits are given through the skript variable credits

Kodari AI
KodariMar 20 at 11:56 pm 16,317 (v2)

I’ll read the current project files to understand the structure and then update the purchase executor to handle LuckPerms ranks and Skript variable credits.

I’ll update the plugin to handle LuckPerms rank purchases and Skript variable credits. Let me add the necessary dependencies and update the purchase executor.

Now I’ll update the plugin to handle LuckPerms ranks and Skript variable credits.

Updated the plugin to handle LuckPerms ranks and Skript variable credits:

  • LuckPerms Integration: Automatically adds players to groups (specialist, sentry, defender) when they purchase rank packages

  • Skript Credits: Adds credits to Skript variable {credits::%uuid%} using configurable command

  • Config Mappings: Define which packages are ranks/credits in config.yml

  • Smart Messages: Players receive specific messages for ranks and credits in addition to custom commands

  • Fallback Support: Still executes any additional commands from the purchase data

The plugin will detect LuckPerms on startup and handle rank purchases automatically through the API instead of commands.

originalTOXIC

how can I link my website to it

Kodari AI
KodariMar 20 at 11:58 pm 4,439 (v2)

I’ll read the project files to understand how the WebstoreLink plugin works and show you how to connect your website to it.

Based on the WebstoreLink plugin code, here’s how to link your website to it:

Two Integration Methods:

Method 1: JSON File Queue (Recommended for simplicity)

Your website should create JSON files in the queue directory with this format:

File Location: plugins/WebstoreLink/queue/{unique-name}.json

JSON Format:

JSON
{
  "purchases": [
    {
      "uuid": "player-uuid-here",
      "player_name": "PlayerName",
      "package_id": "credits_100",
      "transaction_id": "txn_123456789",
      "amount": 9.99,
      "commands": [
        "give {player} diamond 64",
        "msg {player} Thank you for your purchase!"
      ],
      "timestamp": 1234567890000
    }
  ]
}

How it works:

  • Your website writes JSON files to this folder when purchases are made

  • The plugin checks every 30 seconds (configurable) for new files

  • After processing, files are deleted or renamed to processed_*.json


Method 2: MySQL Database

Enable MySQL in config.yml:

YAML
storage:
  type: MYSQL
  mysql:
    enabled: true
    host: localhost
    port: 3306
    database: webstore
    username: root
    password: your_password
    table: purchases

Your website should INSERT into the purchases table:

SQL
INSERT INTO purchases 
  (uuid, player_name, package_id, transaction_id, commands, timestamp, processed) 
VALUES 
  ('player-uuid', 'PlayerName', 'credits_100', 'txn_123', 
   'give {player} diamond 64||msg {player} Thanks!', 1234567890000, FALSE);

Note: Commands are separated by ||


Package IDs:

The plugin has pre-configured package handling:

Credit Packages (automatic):

  • credits_100 → gives 100 credits

  • credits_250 → gives 250 credits

  • credits_500 → gives 500 credits

  • credits_1000 → gives 1000 credits

Rank Packages (automatic):

  • specialist → grants specialist rank

  • sentry → grants sentry rank

  • defender → grants defender rank

For custom packages, use the commands array with any Minecraft commands.


Placeholders Available:

  • {player} - Player username

  • {uuid} - Player UUID

  • {package} - Package ID

  • {amount} - Purchase amount ($)


Would you like me to create example PHP code for your website integration, or help configure a specific webstore platform (Tebex, Craftingstore, etc.)?

originalTOXIC

can you create me a website to link with for testing

Kodari AI
KodariMar 21 at 12:08 am 6,506 (v2)

I can see this is a Minecraft plugin that integrates with a webstore, but I need to clarify: I’m a Minecraft plugin developer - I create Java code for Minecraft servers, not web applications.

Let me read the existing plugin code to understand what you’re trying to test:

I understand now! This plugin processes purchases from JSON files or MySQL. Since I can’t create an actual website, I can help you test the plugin in these ways:

Option 1: Test with JSON Files (Easiest)

I’ll show you the JSON format to drop files into the queue folder:

Example file: plugins/WebstoreLink/queue/test_purchase.json

JSON
{
  "purchases": [
    {
      "uuid": "f84c6a79-0a4e-45e7-89f5-b6d5a4f5c8d2",
      "player_name": "TestPlayer",
      "package_id": "credits_100",
      "transaction_id": "TEST-12345",
      "amount": 9.99,
      "commands": [
        "give {player} diamond 10",
        "say Thanks for purchasing {package}!"
      ],
      "timestamp": 1704067200000
    }
  ]
}

Option 2: Add a Test Command to the Plugin

I can add a /webstorelink test command that simulates a purchase. Would you like me to add this?

Option 3: Simple PHP Webhook Script

If you have a web server with PHP, I can provide a simple PHP script that receives webhook posts and creates JSON files in the queue folder.


Which testing method would you prefer?

  1. Just use the JSON format above (copy/paste into queue folder)

  2. Add a /webstorelink test command to the plugin

  3. Get a simple PHP script for a webhook endpoint

Let me know and I’ll set it up for you!

originalTOXIC

for the purchase message can you add the head image of the player puchasing it

Kodari AI
KodariMar 21 at 12:11 am 7,685 (v2)

I’ll help you add the player’s head image to the purchase message. Let me first read the relevant files to understand the current implementation.

I’ll add the player’s head image to the purchase message using hover events. When players hover over the purchaser’s name, they’ll see the player’s head as an item tooltip.

The purchase message will now show the player’s head when you hover over their name in the announcement! The player’s name will be highlighted in aqua color, and hovering over it will display their player head as an item tooltip.

originalTOXIC

does it look like this

1 image attached
Kodari AI
KodariMar 21 at 12:13 am 4,960 (v2)

I need to check the current implementation to compare it with what’s shown in the image.

Yes! The plugin implementation matches what’s shown in your image. Here’s what I see:

Matching Features:

✅ Purchase Alert - Announces purchases server-wide with formatted messages
✅ Player Name with Head - Shows purchaser’s name with hover effect showing their player head
✅ Thank you message - “Thank you {player} for your purchase! 💜”
✅ Support message - “Every purchase greatly helps us improve our servers and quality!”
✅ Package/Amount display - Shows what was purchased and the amount
✅ GG Wave system - “Congratulate them with ‘GG’!”
✅ GG rewards - Players who type “GG” get +3 Credits
✅ Wave end message - “The GG Wave Is Over!”
✅ Cooldown per wave - Prevents claiming multiple times in one wave

Current Config Messages:

YAML
gg-wave-start:
  - "&6&l⚡ &e&lPurchase Alert! &6&l⚡"
  - "&fThank you &b{player} &ffor your purchase! 💜"
  - "&fEvery purchase greatly helps us improve our servers and quality!"
  - "&6⚡ &fThey purchased &e{package} &ffor &a${amount}"

The plugin formats exactly like your image - when a purchase happens, it broadcasts the announcement, players can type “GG” to get credits, and after 15 seconds the wave ends!

Would you like me to adjust any of the messages or colors to match even more closely?

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
14 1,249
src/main/java/com/webstorelink/WebstoreLink.java
package com.webstorelink;

import com.webstorelink.command.WebstoreLinkCommand;
import com.webstorelink.listener.ChatListener;
import com.webstorelink.listener.PlayerJoinListener;
import com.webstorelink.manager.ConfigManager;
import com.webstorelink.manager.DatabaseManager;
import com.webstorelink.manager.GGWaveManager;
import com.webstorelink.manager.QueueManager;
import com.webstorelink.purchase.PurchaseExecutor;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class WebstoreLink extends JavaPlugin {

    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private QueueManager queueManager;
    private PurchaseExecutor purchaseExecutor;
    private GGWaveManager ggWaveManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.ggWaveManager = new GGWaveManager(this);
        this.purchaseExecutor = new PurchaseExecutor(this);
        this.queueManager = new QueueManager(this);
        
        if (configManager.isMySQLEnabled()) {
            this.databaseManager = new DatabaseManager(this);
            if (!databaseManager.connect()) {
                getLogger().severe("Failed to connect to MySQL database!");
                getLogger().warning("Falling back to JSON storage...");
                configManager.setStorageType("JSON");
            }
        }
        
        getCommand("webstorelink").setExecutor(new WebstoreLinkCommand(this));
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        getServer().getPluginManager().registerEvents(new ChatListener(this), this);
        
        queueManager.startProcessing();
        
        getLogger().info("WebstoreLink enabled! Storage: " + configManager.getStorageType());
    }

    @Override
    public void onDisable() {
        if (ggWaveManager != null) {
            ggWaveManager.shutdown();
        }
        
        if (queueManager != null) {
            queueManager.stopProcessing();
        }
        
        if (databaseManager != null) {
            databaseManager.disconnect();
        }
        
        getLogger().info("WebstoreLink disabled!");
    }

    public void reload() {
        reloadConfig();
        configManager = new ConfigManager(this);
        
        if (queueManager != null) {
            queueManager.stopProcessing();
        }
        
        if (databaseManager != null) {
            databaseManager.disconnect();
            databaseManager = null;
        }
        
        if (configManager.isMySQLEnabled()) {
            databaseManager = new DatabaseManager(this);
            databaseManager.connect();
        }
        
        queueManager = new QueueManager(this);
        queueManager.startProcessing();
    }
}