Cuberite Forum
KeepInventory - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Requests (https://forum.cuberite.org/forum-3.html)
+--- Thread: KeepInventory (/thread-2386.html)

Pages: 1 2


RE: KeepInventory - HeCorr - 04-09-2021

This is quite old and @psyFi seems to not be around anymore so I might give this a try, just for fun  Smile

But as @xoft 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


RE: KeepInventory - tigerw - 04-09-2021

I believe the code dealing with clearing inventory on death is in Player.cpp KilledBy


RE: KeepInventory - HeCorr - 04-10-2021

(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!