Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

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

Open MoshiBar opened this issue 3 years ago • 5 comments

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 avatar Dec 05 '20 02:12 MoshiBar

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

triagonal avatar Dec 21 '20 06:12 triagonal

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

JRoy avatar Jan 11 '21 05:01 JRoy

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

TailedPoog420 avatar Jun 18 '21 15:06 TailedPoog420

no (whenever someone decides to fix it, really)

Chew avatar Jun 18 '21 15:06 Chew

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

Luminous-Journey avatar Jun 19 '21 21:06 Luminous-Journey