#Dimensions killing player
8 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
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.
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
okay i figured out how to catch player tick event, but how do i check players dimension and set him on fire or make him freeze?
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
thanks!