EssentialsX

EssentialsX

2M Downloads

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

MoshiBar opened this issue · 5 comments

commented

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

commented

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

commented

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 :/

commented

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

commented

no (whenever someone decides to fix it, really)

commented

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