Repository navigation
Releases
Releases · al2wastaken/Blackjack
v3.1
New Features & Improvements
-
Dynamic Hologram / TextDisplay Positioning:
- Before Sitting (Empty Table): The table status and rules hologram (
hologram-rules) is centered directly above the table surface (centerLoc + yOffset), inviting approaching players with join instructions and active seat capacity. - After Sitting (Occupied Table): The moment a player sits down in a chair, the
TextDisplaydynamically teleports directly above the Croupier's head (croupierLoc + 2.15 Y), clearing the table center so cards and animations remain 100% unobstructed. - When Table Clears: When the last player leaves the table (
players.isEmpty()), the hologram automatically returns to the table center and displays the idle rules.
- Before Sitting (Empty Table): The table status and rules hologram (
-
Persistent Dealer Hand Score Above Croupier:
- Once the round begins, the dealer's visible upcard value (e.g.,
§6§lKASA: §e10) is continuously displayed above the croupier throughout the entire round and all player turns. - During the croupier's turn, new cards drawn dynamically update the dealer's score in real time.
- Post-round, the final dealer outcome (e.g.,
§6§lKASA: §f19,§6§lKASA: §e21 ★, or§c§lKASA: §424 (PATLADI)) remains visible above the croupier for 3 seconds so players can clearly see the outcome during payouts.
- Once the round begins, the dealer's visible upcard value (e.g.,
-
Paper Chunk Ticket Support:
- Implemented
world.addPluginChunkTicket(cx, cz, plugin)and chunk management to prevent tables, chairs, and displays from despawning when all players leave the world while other worlds remain populated.
- Implemented
Bug Fixes
- Fixed Hologram & Croupier Display Despawn on Round Start:
purgeTrackedDisplays()was previously targeting allblackjack-entity/blackjack-croupier-texttags, causing the croupier's text display to be killed every time a new round started. It now strictly purges only lingeringblackjack-carddisplays.
- Fixed Seated Player Display Visibility:
- Resolved an issue where
seated.hideEntity(plugin, display)hid the croupier's score display from seated players, preventing them from seeing dealer scores. Seated players now retain full visibility of the croupier's overhead text.
- Resolved an issue where
- Fixed Adjacent Table Entity Cross-Purging:
- Scoped all entity removal routines strictly to specific table ID tags (
blackjack-table:<id>), preventing side-by-side casino tables from accidentally purging each other's models, chairs, or holograms.
- Scoped all entity removal routines strictly to specific table ID tags (
- Fixed Table Despawn When Players Stand Up:
- Separated card cleanup (
clearAllDisplays) from full table teardown (purgeAllTableEntities). Standing up from a table no longer deletes the table model or chairs.
- Separated card cleanup (
- Fixed Cross-World Distance Calculation Crashes:
- Added world equality checks to
PlayerMoveEventand interaction listeners, resolvingIllegalArgumentException: Cannot measure distance between different worldsduring cross-world teleports.
- Added world equality checks to
v3.0
THIS VERSION HAS SEVERAL BUGS - USE THE LATEST!
Changes & Additions
3D Table & Seating
- 5x3 Chamfered Table Model: Built using
BlockDisplayentities with 45-degree angled front corners, wooden railings, and customizable wool felts (Green, Red, Blue, Black, Purple, Lime, Cyan). - Multi-Layer Physical Chairs: 5 individual seats arranged along the curved table edge using layered ArmorStand entities (plank base, slab seat, wool cushion, invisible seat vehicle) with auto-aligning yaw towards the dealer.
- Orphan Entity Cleanup: Startup/shutdown routine that purges leftover table displays, card items, and chair entities tagged with plugin metadata.
PacketEvents Virtual Croupier (Player NPC)
- Client-Side Virtual NPC: Spawned via PacketEvents 2.13.0+ protocol packets (
PlayerInfoUpdate,SpawnEntity,EntityMetadata). Does not register as a real server entity. - Mojang-Signed Skins: Includes valid Mojang texture and signature pairs (
classic,lady,mafia,casual) to prevent client disconnects on 1.21+ clients. - Head Look & Deal Animations: Croupier turns its head toward the target seat and triggers arm-swing packets (
SWING_MAIN_ARM) when dealing or drawing cards. - Overhead Score Display:
TextDisplayabove the croupier showing dealer status, current hand total, and bust state. - Tab List & Nametag Management: Removed from the client tab list 40 ticks post-spawn; nametag hidden via a scoreboard team (
NAME_TAG_VISIBILITY = NEVER).
Gameplay & Controls Overhaul
- Physical Controls (No Commands Required):
- Hit: Left-click (punch table or air while seated).
- Stand: Right-click (click table or air while seated).
- Double Down: Press Spacebar during your turn.
- Open Bet Menu: Press Spacebar before the round starts.
- Private Hand Displays: Each seated player has an individual
TextDisplayabove their dealt cards showing their hand total and action prompts. Hidden from other players viaplayer.hideEntity(). - Sequential Card Dealing: Initial cards are dealt around the table with an animation delay, head tracking, and deal sounds.
- Paced Dealer Turn: After player turns finish, the dealer reveals the hole card and draws subsequent cards one by one with a 1.5-second (30-tick) delay and arm-swing animations.
- Turn Timer & BossBar: 10-second turn limit with a color-coded BossBar (green for the active player, red for other seats). Automatically stands if the timer expires.
- Pre-Game Countdown: 15-second in-seat countdown with actionbar timer and tick sounds once players sit. Auto-places minimum bet if unset, or ejects players with insufficient funds.
User Interfaces (GUIs)
- BettingGUI: In-game betting menu providing preset chip buttons (10, 25, 50, 100, 250, 500), a custom bet button, and a "decide later" clock button.
- SignGUI: Packet-based sign input editor for typing custom bet amounts without placing blocks in the world.
- TableSettingsGUI: Admin configuration menu opened by Shift + Right-clicking a table or croupier. Allows adjusting croupier skin, min/max bets, countdown duration, and table felt color on the fly.
- LeaveConfirmGUI: Confirmation modal displayed when a player attempts to dismount/leave while a bet is active, warning them about bet forfeiture.
Database & Storage (HikariCP)
- Connection Pooling: Integrated HikariCP 5.1.0 with shaded/relocated packages to prevent classpath collisions.
- SQLite & MySQL: Supports local SQLite file (
blackjack.db) or remote MySQL databases configurable inconfig.yml. - Data Migration: Automatically migrates existing table definitions and player statistics from
config.ymlandstats.ymlinto SQL tables on first run. - Async Operations: Thread-safe, asynchronous stats saving and loading to avoid main-thread blocking.
Localization & Integrations
- Dual Language Support:
- Default: English (
messages_en.yml). - Turkish:
messages.yml(activated vialanguage: trinconfig.yml).
- Default: English (
- PlaceholderAPI: Added
%blackjack_*%placeholders covering player stats (wins, losses, win rate, streaks, total earnings), table status, and active hand values. - Vault & PhysicalEconomy: Standard Vault economy provider integration with delayed hook support for late-loading economy plugins.