> ## Documentation Index
> Fetch the complete documentation index at: https://pumpkings.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Blackjack: Configure Tables, Rules, and Win Conditions

> Place a physical blackjack table in your world, run full 6-row inventory sessions with Hit, Stand, and Double Down, and pay out natural blackjack at 2.5×.

The LiricCasino Blackjack table is a physical block entity you place directly in your Minecraft world. When a player interacts with it, a private 6-row inventory GUI opens for that player alone — multiple sessions can run on the same table simultaneously, so many players can enjoy a game at the same time without waiting. Each session plays a complete round of standard Blackjack against an automated dealer, all resolved inside the inventory interface.

## Placing and Managing Tables

<Steps>
  <Step title="Stand at the table location">
    Move to the spot in your world where you want the blackjack table to appear.
  </Step>

  <Step title="Run the setup command">
    ```
    /blackjack setup
    ```

    A table entity spawns at your feet and becomes immediately interactive for players.
  </Step>

  <Step title="Remove tables when needed">
    | Command             | Effect                                            |
    | ------------------- | ------------------------------------------------- |
    | `/blackjack delete` | Remove the nearest blackjack table entity         |
    | `/blackjack purge`  | Remove all blackjack table entities on the server |
  </Step>
</Steps>

***

## How a Round Works

<Steps>
  <Step title="Interact with the table">
    Right-click the physical table entity. A bet selection screen opens. Enter your wager (within your permitted range) and confirm to start the session.
  </Step>

  <Step title="Initial deal">
    Both you and the dealer receive two cards. Your cards and score are shown in the bottom rows of the 6-row GUI; the dealer's cards appear near the top. The dealer's **second card is hidden** (face-down) while it's your turn.
  </Step>

  <Step title="Take your action">
    Three action buttons appear at the bottom of the GUI during your turn:

    <CardGroup cols={3}>
      <Card title="✚ Hit" icon="plus">
        Draw one more card from the deck. You can Hit as many times as you like until you Stand, bust (go over 21), or use Double Down.
      </Card>

      <Card title="✋ Stand" icon="hand">
        Lock your current total and pass to the dealer. No more cards are drawn for you.
      </Card>

      <Card title="💰 Double Down" icon="coins">
        Available on your **first action only**. Doubles your bet, draws exactly one card, and then automatically Stands. An additional wager equal to your original bet is charged immediately.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Dealer's turn">
    After you Stand or Double Down, the dealer flips the hidden card and draws one card per second until their total reaches **17 or higher**. You can watch each draw animate in the GUI in real time.
  </Step>

  <Step title="Result">
    A result item appears in the centre of the GUI showing your outcome. Your balance is updated immediately.
  </Step>
</Steps>

***

## Payout Table

| Outcome                 | Condition                         | You Receive           |
| ----------------------- | --------------------------------- | --------------------- |
| 🃏 Natural Blackjack    | You open with 21; dealer does not | **2.5× your bet**     |
| 🤝 Push (Tie Blackjack) | Both you and dealer open with 21  | **Bet returned (1×)** |
| ✅ Win                   | Your total beats the dealer       | **2× your bet**       |
| ✅ Dealer Bust           | Dealer exceeds 21                 | **2× your bet**       |
| 🤝 Push                 | Equal totals after dealer stands  | **Bet returned (1×)** |
| ❌ Loss                  | Dealer total is higher            | **No payout**         |
| ❌ Bust                  | Your total exceeds 21             | **No payout**         |

<Note>
  Aces count as 11 or 1 (whichever keeps your hand at 21 or below), and face cards (J, Q, K) count as 10 — standard casino Blackjack rules.
</Note>

***

## Dealer Rules

The automated dealer follows a hard set of rules with no deviation:

* The dealer always draws until their score is **≥ 17**.
* If the dealer exceeds 21, they bust and every active player who hasn't already busted wins.
* The dealer's second card remains hidden until the dealer's turn begins, preserving the face-down mechanic.

***

## Bet Limits and Daily Uses

<Tabs>
  <Tab title="Default Players">
    ```yaml theme={null}
    blackjack:
      bet:
        default:
          min: 100.0
          max: 100000.0
      uses:
        default:
          max-uses-per-day: 10
    ```
  </Tab>

  <Tab title="VIP Players">
    ```yaml theme={null}
    blackjack:
      bet:
        ranks:
          vip:
            permission: "casinoliric.bet.vip"
            max: 500000.0
      uses:
        ranks:
          vip:
            permission: "casinoliric.uses.vip"
            max-uses-per-day: 50
    ```
  </Tab>

  <Tab title="Admins">
    ```yaml theme={null}
    blackjack:
      bet:
        ranks:
          admin:
            permission: "casinoliric.bet.admin"
            max: 10000000.0
      uses:
        ranks:
          admin:
            permission: "casinoliric.uses.admin"
            max-uses-per-day: -1   # -1 = unlimited
    ```
  </Tab>
</Tabs>

The `raise-amount` key (default `5000.0`) controls the step size of the bet adjustment buttons inside the GUI:

```yaml theme={null}
blackjack:
  raise-amount: 5000.0
```

***

## Concurrent Sessions

Because each session is scoped to an individual player's inventory GUI, many players can be mid-game on the same table at the same time. There is no seat limit enforced at the table entity level — the constraint is purely the per-player daily use cap you configure.

***

## Tax Integration

Enable the tax system to deduct a percentage from gross winnings:

```yaml theme={null}
taxes:
  enabled: true
  blackjack: 0.05   # 5 % of winnings deducted before deposit
```

The deduction applies to the **gross payout** (e.g., on a 2× win of $10,000, the 5 % is taken from $20,000).

***

## Admin Command Reference

| Command             | Description                              |
| ------------------- | ---------------------------------------- |
| `/blackjack setup`  | Spawn a blackjack table at your location |
| `/blackjack delete` | Remove the nearest blackjack table       |

<Warning>
  If you run `/blackjack delete` while players are mid-session at that table, their active GUI sessions may be force-closed. Always warn players before removing a table that is in use.
</Warning>
