Skip to content

Comments

Fix sell-all command with player item limits#20

Closed
alwyn974 wants to merge 1 commit intomainfrom
claude/fix-sell-all-player-limit-011CUq3oWJGjw6PifGVcvB7T
Closed

Fix sell-all command with player item limits#20
alwyn974 wants to merge 1 commit intomainfrom
claude/fix-sell-all-player-limit-011CUq3oWJGjw6PifGVcvB7T

Conversation

@alwyn974
Copy link
Contributor

@alwyn974 alwyn974 commented Nov 5, 2025

When using /sell-all with items that have player limits (e.g., 512 coal per 24h), overflow items were being combined into single slots with illegal stack sizes, causing player kicks.

Changes:

  • Added partial selling support for both server and player limits
  • When a stack exceeds the limit, now sells only what fits within the limit
  • Overflow items are properly returned to inventory split into legal stack sizes
  • Updated price calculation to reflect actual amount sold instead of full stack
  • Ensured item removal uses the adjusted amount

Example: If player can sell 32 more coal but has a stack of 64, the plugin now sells 32 and returns 32 to inventory, rather than skipping the entire stack.

When using /sell-all with items that have player limits (e.g., 512 coal per 24h),
overflow items were being combined into single slots with illegal stack sizes,
causing player kicks.

Changes:
- Added partial selling support for both server and player limits
- When a stack exceeds the limit, now sells only what fits within the limit
- Overflow items are properly returned to inventory split into legal stack sizes
- Updated price calculation to reflect actual amount sold instead of full stack
- Ensured item removal uses the adjusted amount

Example: If player can sell 32 more coal but has a stack of 64, the plugin
now sells 32 and returns 32 to inventory, rather than skipping the entire stack.
@alwyn974 alwyn974 closed this Nov 5, 2025
@alwyn974 alwyn974 deleted the claude/fix-sell-all-player-limit-011CUq3oWJGjw6PifGVcvB7T branch November 5, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants