How do I get gamerule keepInventory working

2 posts / 0 new
Last post
Last seen: 2 years 3 months ago
Joined: 03/07/2015 - 21:21
Gems: 0
How do I get gamerule keepInventory working

I would like it if someone could help me out. I want to make an item that lets me keep my inventory but it doesn't work. Can someone help me?

Last seen: 7 months 1 week ago
Joined: 02/24/2015 - 19:32
Gems: -1
This is kinda complicated but

This is kinda complicated but heres my idea i think will work:
Make an Item that you want to make you keep invo.
Add global event that checks every few seconds if you have the item in your iventory.
Add global event if you do have item in invo execute command:
gamerule keepInventory true
Then maybe add ANOTHER global event that executes command:
gamerule keepInventory false
every few seconds or mins.

If your getting the Messages saying the gamerule has changed I would try disabling the gamerule doCommandBlockoutput

Also the gamerules are case sensitive I would look them up just to be safe incase I made a mistake.