#Dimensions killing player

8 messages · Page 1 of 1 (latest)

subtle heath
#

How do i make players always burn in nether and freeze in the end?
or just always to get damaged in these dimentions

cinder pondBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

ancient cargo
#

You can do this by 2 methods

1 - make a player tick event and check his dimension and if it is the nether or end damage the player by the amount you want and set the source to fire to freezing.

2 - there is an forge event to detect whenever an entity change his dimension which is net.minecraftforge.event.entity.EntityTravelToDimensionEvent, so you have to listen to it and check if the entity is player and check the dimension aswell and repeat the first method.

subtle heath
#

im using fabric, so the first option is the only one available
but how do i do that? i am novice and documentation doesnt give any information on how to do that

subtle heath
ancient cargo
#

I think its something like

event.player.level.dimension

#

For the damage you should use

event.player.attack(), the rest of the parameters of the attack is on you buddy

subtle heath
#

thanks!