KeepInventory for players in certain scenarios

Started by Folkpizza on

Topic category: Help with modding (Java Edition)

Last seen on 03:20, 21. Sep 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
KeepInventory for players in certain scenarios

Hello!

 

I'm currently working on a mod with custom bosses in there own separate dimensions. (certain items teleport you and it's just a void with the arena at 0 0) I'm planning for these bosses to be kinda hard so the player will have to die a lot, but I don't want them losing there items in the arena. So I was wondering if there was a way to make it that if a player dies in a certain area or by a certain mob, it would keep there inventory. If that isn't possible I was also experimenting with just teleporting all items on the ground when players respawn to them but I couldn't get it to work, if someone could help me with that if the first isn't possible that would also be super helpful!!

Thank you in advance!