Skip to content

Getting Started

This guide walks through the first working setup for Spigot Sales Webhook.

You need:

  • Java 25 if you run the worker directly
  • a Discord webhook URL
  • a valid SpigotMC cookie with access to your premium resource buyer pages
  • at least one SpigotMC premium resource buyer-list URL

Copy the example config and fill in your private values.

Terminal window
Copy-Item src/main/resources/config.example.yml src/main/resources/config.yml

src/main/resources/config.yml is ignored by git.

Open src/main/resources/config.yml and configure one resource under spigot.plugins.

config.yml
discord:
webhook-url: "https://discord.com/api/webhooks/your-webhook-id/your-webhook-token"
username: "Spigot Sales"
spigot:
cookie: "xf_session=...; xf_user=...; xf_tfa_trust=..."
request-delay-ms: 800
plugins:
- name: "My Premium Plugin"
buyer-list-url: "https://www.spigotmc.org/resources/my-premium-plugin.12345/buyers"
scan:
interval-minutes: 60
notify-existing-on-first-run: false
state-file: "data/seen-sales.json"

The buyer-list-url should point to the resource’s buyers page. The cookie must belong to an account that can see that page.

Terminal window
gradlew.bat clean jar

The built jar is created under build/libs/.

Run one scan and exit:

Terminal window
java -jar build/libs/spigot-sales-webhook-1.0.0.jar --once

By default, the first scan records existing buyers without notifying Discord. This prevents a noisy first setup when a resource already has buyers.

To send notifications for existing buyers during a one-off run, set scan.notify-existing-on-first-run to true first:

scan:
notify-existing-on-first-run: true

Then run the one-off scan:

Terminal window
java -jar build/libs/spigot-sales-webhook-1.0.0.jar --once

Start the worker without --once:

Terminal window
java -jar build/libs/spigot-sales-webhook-1.0.0.jar

It immediately runs a scan, then waits scan.interval-minutes before the next scan.