Hooks
Hooks provided by the Cards module for card drawing functionality.
Overview
The Cards module implements a complete playing card system with a full 52-card deck that supports shuffling, drawing, and synchronized gameplay. It provides real-time card draw synchronization across all players for fair minigame mechanics and includes comprehensive hook integration for custom card game implementations, deck management, and game state tracking.
CardDrawn
đ Purpose
Called when a player draws a card using the cards command.
â° When Called
After a card has been randomly selected and displayed to the player.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who drew the card |
card |
string | The card that was drawn (e.g., "Ace of Spades") |
âŠī¸ Returns
nil
đ Realm
Server
CardsCommandUsed
đ Purpose
Called when a player uses the cards command.
â° When Called
Before checking if the player has a card deck and before drawing a card.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who used the cards command |
âŠī¸ Returns
nil
đ Realm
Server