CloudburstMC / FakeInventories

Create fake inventories
GNU General Public License v3.0
19 stars 15 forks source link

How to use this API #2

Closed GMatrixGames closed 5 years ago

GMatrixGames commented 5 years ago

Hi,

I got the creation of inventories down, but I can't figure out how to open it to the player, could someone help me!

Thanks.

SupremeMortal commented 5 years ago

To add: player.addWindow(inventory) To remove: player.removeWindow(inventory) With removal, you'll want to delay it with a task otherwise it could crash the game or make the UI disappear. 2 ticks should be enough. These questions are best asked on our discord: https://discord.gg/5PzMkyK

GMatrixGames commented 5 years ago

Ok, thanks for the info, wasn't sure where to ask it :)