BG-Software-LLC / WildChests

Sell chests, auto crafters, storage units, larger chests and more in one plugin!
https://bg-software.com/wildchests/
GNU General Public License v3.0
38 stars 23 forks source link

[API] Chest.addItem #169

Closed Angeschossen closed 1 year ago

Angeschossen commented 1 year ago

Minecraft's Version

[10:53:20 INFO]: Checking version, please wait... [10:53:20 INFO]: This server is running Paper version git-Paper-466 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 7af4cd3) You are 11 version(s) behind

Plugin's Version

[10:53:35 INFO]: WildChests version 2023.1

Describe the bug

Calling Chest.addItem at a storage chest doesn't add the item if the current amount of items in the storage chest isn't 0. The returned map is empty, though. Of course, they're all identical. Just not the amount.

To Reproduce

  1. call chest.addItems(new ItemStack(Material.STONE)) repeatedly.

The amount will always stay at 1 in the storage chest. So after the first call, no actual items are added even though the returned map is empty.

Additional Information

With a chest of type large_chest it works fine.

SrMonsterYT commented 1 year ago

@OmerBenGera could you please help, and sorry for marking you

OmerBenGera commented 1 year ago

Fixed in latest dev build. @Angeschossen You know you can just use Vanilla's interfaces to interact with WildChests, right? Instead of doing StorageChest#addItems (or Chest#addItems from WildChests), you can use Vanilla's Chest#addItems.