Page 1 of 1

[solved] Setting player cursor stack?

Posted: Sat Oct 08, 2016 1:15 am
by aubergine18
Is it possible to set the player cursor stack? I can see how to clear it with LuaPlayer.clean_cursor(), but the LuaPlayer.cursor_stack property is read-only (according to docs) so.... how do I set a cursor stack? Also the LuaPlayer.character.stack property is also read-only (not sure if that's a different type of stack though).

Re: Setting player cursor stack?

Posted: Sat Oct 08, 2016 1:43 am
by Rseding91
The return type is LuaItemStack which has methods to set the stack/count/durability and so on.

Re: Setting player cursor stack?

Posted: Sat Oct 08, 2016 1:44 am
by aubergine18
Ah, awesome! Thank you !! :D