The players in an smp I play on want the dragon egg to not be able to go inside any containers, and to preferably also be indestructible, but I'm having problems figuring out how to do this.
So, does anyone know how to make it so the dragon egg can't be put into any container such as a chest, barrel, or enderchest? The only inventory it should ever be in is the player's. So far I've only found out how to stop it from going into hoppers.
on inventory pickup:
if event-item is dragon egg:
cancel event
I would also like it to be indestructible, but so far I've only found out how to disable it from despawning.
on item despawn of dragon egg:
cancel event
This is good, but it should also be immune to explosions, fire, cacti, anvils, and the void. I reckon I could partly do this by detecting when the dragon egg is dropped (probably by using "on item spawn of dragon egg:") then setting the nbt data of the entity to have insanely high health, but I have no idea how to do this, and it may not work for cacti nor the void. If the egg falls into the void, I would like it to be teleported back to the end portal as well.
I don't want to bother the server host by asking him to download an addon for Skript, so I would like it to be possible using only vanilla Skript, but I understand if that's too hard or impossible to do. In any case, I would greatly appreciate any help, thanks!