Compatibility
Minecraft: Java Edition
Platforms
Creators
Details
Changelog
Added Features Heart Item Stacking Support: Heart items can now stack up to the default Minecraft limit (64). Removed unique UUID tagging per heart, allowing for easier inventory management and bulk handling without compromising functionality. Player-to-Player Heart Gifting: New command /lifesteal giveheart <player> <amount> allows players to directly gift heart items to others. Includes a 30-second cooldown per player to prevent spam . Giver must specify a valid online player and amount . Recipients receive the hearts in their inventory (or dropped if full), with confirmation messages for both parties. No permission required for players; admins can still use /lifesteal give for unrestricted gifting. Advanced Trade System: Full trading GUI for secure item exchanges, including hearts. Initiate Trade: Use /lifesteal trade <player> to send a trade request to another online player. Accept Request: The target player uses /lifesteal trade accept to open the trade GUI. GUI Design: 54-slot double chest inventory titled "Trade with [PlayerName]". Decline Button: Red Concrete in top-left slot (slot 0) – Right/left-click to cancel the trade for both players. Accept Button: Green Concrete in top-right slot (slot 8) – Right/left-click to lock your offer (button updates to "Accepted ✓" when clicked). Initiator Slots: Top two rows – Only the trade initiator can place/take items here. Partner Slots: Bottom two rows – Only the partner can place/take items here. Players cannot access the other's slots; attempting to do so shows a warning message. Trade Mechanics: Both players can add/remove/swap items in their designated slots at any time. Clicking "Accept" locks the current offer; any changes reset the accept status for that player. Trade completes only when both players have accepted – Items are automatically transferred (initiator receives partner's offer, and vice versa). If inventory is full, excess items drop at the player's feet. Closing the inventory or declining cancels the trade, returning all placed items to their original owners. Prevents duplicate requests or trades if either player is already in an active trade. Offline players or invalid requests are handled gracefully with error messages. Safety Features: Trade requests expire if not accepted promptly; items are never lost on cancellation. Both players receive synchronized updates and notifications throughout the process. Updated Command Help: /lifesteal now includes giveheart and trade in its usage message for easy discovery. Changes Command Structure Enhancements: /lifesteal subcommands now explicitly list all options: reload, give, revive, stats, giveheart, trade. /lifesteal trade supports two modes: <player> for requests and accept for confirmation. Consolidated trade logic into dedicated methods (startTrade, cancelTrade, completeTrade, returnItems) for better maintainability. Inventory Event Handling: Added InventoryClickEvent and InventoryCloseEvent handlers specifically for trade GUIs. All clicks in trade inventories are cancelled by default, with custom logic for buttons and slots. Visual feedback: Accept buttons update dynamically to show acceptance status. Data Management: Introduced internal maps for trade state: pendingRequests (for requests), activeTrades (for ongoing trades), and giveCooldowns (for gifting timers). No changes to player data persistence; hearts, withdrawn, and consumed stats remain unchanged.



