Integration

Hytale Plugin

Install and configure the HytalePay plugin for automatic delivery.

The HytalePay plugin connects your game server to your store, enabling automatic item delivery when customers make purchases.

Requirements

  • A running Hytale server
  • HytalePay store with API key
  • Server administrator access

Installation

Step 1: Download the Plugin

Download the HytalePay plugin from CurseForge.

Step 2: Install on Server

  1. Stop your server
  2. Copy the plugin file to your plugins/ folder
  3. Start your server
  4. The plugin will create its configuration files

Step 3: Configure the Plugin

Edit plugins/HytalePay/config.yml:

# HytalePay Configuration

api-key: "your-api-key-here"

store-id: "your-store-id-here"

check-interval: 30

debug: false

Step 4: Reload

Run /hytalepay reload or restart your server.

Configuration UI

The plugin includes a built-in configuration GUI for server administrators. Access it with the /obconfig command.

The GUI displays:

  • Status - API connection status
  • Active Handlers - Number of registered order handlers
  • API Configuration - Current settings (sensitive values masked)
  • Polling Interval - How often the plugin checks for orders

Actions available:

  • Manual Refresh - Trigger an immediate order check
  • Reload Config - Reload configuration from disk without restarting

Commands

CommandPermissionDescription
/orders-Manually fetch pending orders (30s cooldown)
/obconfighytalepay.adminOpen configuration GUI
/obitemshytalepay.adminOpen item commands GUI

Item Commands UI

The /obitems command opens a UI to configure what commands run when a player purchases each item.

Features:

  • Category dropdown - Browse items by store category
  • Search - Filter items by name
  • Command editor - Add, remove, and reorder commands per item
  • Placeholder buttons - Quick insert {player}, {item_name} variables
  • Visual status - See which items have commands configured

Items with commands configured show in green, unconfigured items show in gray.

How Delivery Works

  1. Customer completes purchase on your store
  2. Order is marked as completed
  3. Plugin polls for pending deliveries
  4. Items are given to the player
  5. Delivery marked as complete

Online Players

Items are delivered immediately when the player is online.

Offline Players

Items are queued and delivered when the player joins.

Setting Up Products

When creating products in your dashboard, configure what the player receives:

Rank Products

commands:
  - "lp user {player} parent set vip"
  - "broadcast &6{player} &7just purchased &6VIP&7!"

Item Products

commands:
  - "give {player} diamond_sword 1"
  - "give {player} diamond_pickaxe 1"
  - "give {player} diamond 64"

Variables

VariableDescription
{player}Player's username
{uuid}Player's UUID
{product}Product name
{price}Purchase price
{order_id}Order ID

Troubleshooting

"Connection failed" error

  • Check your API key is correct
  • Verify your server can reach api.hytalepay.com
  • Check firewall settings

Items not delivering

  • Ensure the player username matches exactly
  • Check the plugin has permission to run commands
  • Enable debug mode and check logs

"Invalid store ID" error

  • Double-check your store ID from the dashboard
  • Make sure there are no extra spaces

Best Practices

  1. Test first: Use test mode to verify deliveries work
  2. Use exact usernames: Delivery requires exact username match
  3. Monitor logs: Check for errors regularly
  4. Keep updated: Update the plugin when new versions release
  5. Backup config: Save your configuration before updates

Support

If you encounter issues:

  1. Check the plugin logs in plugins/HytalePay/logs/
  2. Enable debug mode for more details
  3. Contact support with your store ID and error messages