How do I get gamerule keepInventory working

Started by creeperleeper on Sun, 03/08/2015 - 16:52
Last seen on 00:34, 21. Jul 2015
Joined Mar 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How do I get gamerule keepInventory working
Sun, 03/08/2015 - 16:52

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 on 20:39, 17. Mar 2017
Joined Feb 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
This is kinda complicated but
Thu, 03/12/2015 - 18:29

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.