Is there some way that I can save player potion effects after death? I have already tried this command: /gamerule keepInventory True but it doesn't work. Is there any way to save player potion effects after death?
Minecraft – How to can save player potion effects after death
minecraft-java-edition
Related Topic
- Minecraft Inventory Saving
- Minecraft /xp wont let me target @p or @a
- Minecraft – Is it possible to target entities with potion effects through any command
- Minecraft – How to make an execute command there is a player looking at another player
- Minecraft – Force player to close their inventory
- Minecraft – ny way to check if a player drank a specific potion
Best Answer
This problem can be solved like this:
If they obtain the potion effect via redstone switch or button, then have that switch or button set off a redstone signal leading to command block, as shown in this picture:
The Command block branching off to the right of the button will give the player the effect, and the one branching off to the left will place the block of redstone shown above it. This will cause an extremely rapid redstone clock updating the command block thats connected to the clock. This will check for player death. If a player death is detected, it will cause the comparator to send a signal to the connected command block and will give the player their effect back. This method works as of minecraft 1.7.10.