3

I'm trying to make it so that if my friend is in the Nether, it will give him a potion effect, but I can't figure it out.

7
  • What have you tried so far?
    – Joachim
    Commented Nov 9, 2022 at 9:46
  • If you are using commands then it doesn't matter what dimension they are in.
    – AwesomeT43
    Commented Dec 5, 2022 at 15:16
  • 1
    @Joachim I think you changed the intention of the post in your last edit - nowhere does it say that it needs to come from the overworld. In fact i was very confused as to what the question asks until I read your edit.
    – Plagiatus
    Commented Apr 3, 2023 at 7:13
  • 1
    @Plagiatus Is this better? The original sentence doesn't completely make sense to me, hence the change. Thank you for pointing it out, though.
    – Joachim
    Commented Apr 3, 2023 at 9:30
  • 1
    @Joachim yes, that seems a lot more in line with the original question.
    – Plagiatus
    Commented Apr 3, 2023 at 11:20

1 Answer 1

2

Thanks to the 1.19.50 update to execute, you can use execute in to check what dimension a player is in:

execute as @a at @s in nether if entity @s[r=1] run say I'm in the nether!

Now you can of course replace the say command with whatever you want to run instead, in OPs case the effect command targeting @s.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .