Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/sell hand with the same item in offhand results in error #3810

Closed
MoshiBar opened this issue Dec 5, 2020 · 5 comments · Fixed by #5021
Closed

/sell hand with the same item in offhand results in error #3810

MoshiBar opened this issue Dec 5, 2020 · 5 comments · Fixed by #5021
Labels
bug: confirmed Confirmed bugs in EssentialsX. bug: upstream Bugs that exist in the Bukkit API or Minecraft itself.

Comments

@MoshiBar
Copy link

MoshiBar commented Dec 5, 2020

Information

Full output of /ess version:

Server version: 1.16.4-R0.1-SNAPSHOT git-Paper-313 (MC: 1.16.4)
EssentialsX version: 2.18.2.0
LuckPerms version: 5.1.93
Vault version 1.7.3-b131
EssentialsXProtect version: 2.18.2.0
EssentialsXGeoIP version: 2.18.2.0
EssentialsXChat version: 2.18.2.0
EssentialsXAntiBuild version: 2.18.2.0
EssentialsXSpawn version: 2.18.2.0

Server startup log:
latest.log

EssentialsX config:
config.yml.txt

Details

Description:
using /sell hand when the same type of item is in the offhand results in the following error: Error: Trying to remove more items than are available

Steps to reproduce:
Use /sell hand on an item with the same item in the offhand

Expected behavior:
Items should be sold as normal

@MoshiBar MoshiBar added the bug: unconfirmed Potential bugs that need replicating to verify. label Dec 5, 2020
@triagonal triagonal added bug: confirmed Confirmed bugs in EssentialsX. and removed bug: unconfirmed Potential bugs that need replicating to verify. labels Dec 21, 2020
@triagonal
Copy link
Member

I was able to reproduce this on the following:

[01:43:39 INFO]: Server version: 1.16.4-R0.1-SNAPSHOT git-Paper-337 (MC: 1.16.4)
[01:43:39 INFO]: EssentialsX version: 2.19.0-dev+27-c4ca0e5
[01:43:39 INFO]: LuckPerms version: 5.2.63
[01:43:39 INFO]: Vault version: 1.7.3-b131

I was also able to identify another issue involving /sell with items in the offhand:

Using /sell all while holding sellable items in both the inventory and the offhand as per
image
results in this message with no items being sold:
image

@JRoy
Copy link
Member

JRoy commented Jan 11, 2021

Issue appears to be bukkit's Inventory#containsAtLeast not including extra slots in the calculation. Will require more hackery from us if that's the case :/

@TailedPoog420
Copy link

Any ETA on when a fix for this might be released? @JRoy

@Chew
Copy link
Member

Chew commented Jun 18, 2021

no (whenever someone decides to fix it, really)

@Luminous-Journey
Copy link

pls fix, really irritating when you have armor on and want it deleted

@pop4959 pop4959 added the bug: upstream Bugs that exist in the Bukkit API or Minecraft itself. label Jun 26, 2021
mdcfe pushed a commit that referenced this issue Dec 24, 2022
Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>

Complete refactor of inventory handling across the plugin. This simplifies various commands, and aims to resolve issues aon various different MC versions and inconsistencies between parts of the plugin.

Fixes #3810
Fixes #4248
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed Confirmed bugs in EssentialsX. bug: upstream Bugs that exist in the Bukkit API or Minecraft itself.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants