Cuberite Forum

Full Version: KeepInventory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This is quite old and seems to not be around anymore so I might give this a try, just for fun  Smile

But as noted on psy's thread:

(08-07-2017, 11:37 PM)xoft Wrote: [ -> ]This will most likely need further support from the C++ side of things, many gamerules require changes in the underlying code.

So we'll see how far I'll be able to go  Big Grin
I believe the code dealing with clearing inventory on death is in Player.cpp KilledBy
(04-09-2021, 08:17 PM)tigerw Wrote: [ -> ]I believe the code dealing with clearing inventory on death is in Player.cpp KilledBy

That's super helpful to know!

My initial idea was to use HOOK_KILLING to save the player's inventory on a variable or something and restore it on HOOK_PLAYER_SPAWNED or something hahah!

I guess I'll have to put my hands on C++ afterall  Smile

...which will be an interesting challenge since I've never programmed in C++ before!
Pages: 1 2