talvix04

Would like to make a tebex gift card gamble plugin like complexmc

Kodari AI
KodariSep 24 at 12:23 pm 1
TebexGamble
A Minecraft plugin that integrates with Tebex to let players gamble gift cards. Players purchase gift cards through the Tebex webstore, then redeem them in-game to play a gambling minigame. The plugin features a slot-machine style interface where players wager their gift card balance for a chance to multiply their rewards. Includes configurable payout rates, win chances, and a leaderboard tracking the biggest winners. Players can check their balance, gamble, and claim winnings through intuitive commands. The plugin syncs with Tebex's API to validate gift cards and manage balances securely, preventing duplication exploits while providing an engaging risk-reward experience for server economies.
  1. Set up a Paper plugin project and command/config files.

  2. Add persistent in-game credits, wager resolution, and admin crediting.

  3. Keep Tebex gift-card verification separate; this version won’t claim to validate real card codes.

Created a Paper plugin starter with persistent player credits and configurable gambling odds.

  • /giftgamble balance — check credits

  • /giftgamble play <amount> — wager credits

  • /giftgamble credit <player> <amount> — manually credit an online player (admin only)

  • Configure win chance, payout multiplier, and max bet in config.yml

This version does not validate or redeem Tebex gift-card codes; credits must be added manually. Real Tebex integration would need a supported way to verify and debit card balances.

talvix04

have it hook into tebex api also could you add gui like coinflip have it do coinflips and it goes to gui add support for vault also :)

Kodari AI
KodariSep 24 at 12:28 pm 3
  1. Add a coinflip GUI and wager flow.

  2. Add Vault economy support.

  3. Investigate Tebex’s supported API and add an integration that doesn’t imply unsupported gift-card redemption.

  1. Coinflip: added the wager menu, open-game list, and player-vs-player payouts.

  2. Vault: I’ll add deposit/withdraw conversion while keeping gamble credits separately stored.

  3. Tebex: I’ll check the supported integration path before wiring anything to gift-card codes.

  1. Coinflip GUI: /giftgamble coinflip opens a menu to create and accept wagers. Stakes are charged only when a match starts, and the winner receives the pot.

  2. Vault: Added /giftgamble deposit <credits> and /giftgamble withdraw <credits>. Conversion is configurable with vault.currency-per-credit; this exchanges Vault money for the plugin’s separately stored credits.

  3. Tebex: I haven’t added direct API or gift-card-code validation; I don’t have a verified redemption flow to implement safely. Tebex can use the existing /giftgamble credit <player> <amount> command after a successful purchase, but the player must be online.

talvix04

have it so they do /cf it asks either to do giftcard balance or in game money dont have max bet lol have it seperate but allow them to do both :)

Kodari AI
KodariSep 24 at 12:32 pm 2
  1. Make /cf open a choice between plugin credits (“giftcard balance”) and Vault money.

  2. Keep the two coinflip balances and payouts separate, allowing either wager type without a configured max-bet cap.

  3. Check the current Tebex wording so the plugin doesn’t imply its credits are verified gift-card funds.

/cf now opens a choice between Giftcard balance (plugin-stored credits) and in-game money (Vault). Each currency has its own coinflip listings, so a player can have one open in both at once.

Added a Custom wager button so players can enter any affordable amount; there’s no configured max-bet cap. Vault wagers and payouts use Vault directly. The plugin-credit option is not verified or redeemed through Tebex.

talvix04

have it hook into tebex api { "data": [ { "id": 38, "code": "165261930219", "balance": { "starting": "25.00", "remaining": "12.60", "currency": "GBP" }, "note": "Created for player ABC", "void": false } ] added it to depends so you can deeper look at da code no they do /cf create amount gc/money smt like that and it goes to the gui and it says what type of bet it is and stuff

Kodari AI
KodariSep 24 at 12:34 pm 1
  1. Integrate gift-card balance/validation with Tebex if the project’s available API supports it.

  2. Add /cf create <amount> <gc|money> and show the wager type and amount in the coinflip GUI.

Tebex: this project currently has no Tebex dependency, and the JSON only shows a balance response. A balance lookup alone can’t safely fund wagers; the integration also needs Tebex’s supported authenticated debit/redemption operation so the same card can’t be wagered twice. I’m proceeding with the /cf create flow using the existing separate GC-credit and Vault-money balances.

  1. Added /cf create <amount> <gc|money>. It creates a listing and opens that currency’s GUI; listings show the wager type and amount. gc uses the plugin’s stored credits, and money uses Vault.

  2. Tebex is not connected yet. The current build.gradle has no Tebex dependency, and the sample shows a balance response but not how to authenticate or debit/reserve a card. A balance-only check can’t safely prevent the same card being wagered more than once. The GC option remains local plugin credits until there’s a supported Tebex debit/redemption flow.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 1,077
src/main/java/com/kodari/giftcardgamble/GiftCardGamblePlugin.java
package com.kodari.giftcardgamble;

import java.util.Objects;
import org.bukkit.plugin.java.JavaPlugin;

public final class GiftCardGamblePlugin extends JavaPlugin {
    private WalletManager walletManager;
    private CoinflipManager coinflipManager;
    private VaultEconomyManager vaultEconomyManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        walletManager = new WalletManager(this);
        if (getServer().getPluginManager().getPlugin("Vault") != null) {
            vaultEconomyManager = VaultEconomyManager.hook(this, walletManager);
        }
        coinflipManager = new CoinflipManager(this, walletManager, vaultEconomyManager);
        getServer().getPluginManager().registerEvents(coinflipManager, this);
        Objects.requireNonNull(getCommand("giftgamble"), "giftgamble command is missing")
                .setExecutor(new GiftGambleCommand(this, walletManager, coinflipManager, vaultEconomyManager));
    }

    @Override
    public void onDisable() {
        if (walletManager != null) {
            walletManager.save();
        }
    }
}