Solved Anti Nether Roof

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

iMinePixels

Member
Mar 12, 2024
22
1
1
I read over the docs for
SCSS:
on player move
, it says "These events can be performance heavy as they are called quite often.", is there a way to do what my script does but without that performance drain?

Code:
on player move:
    if player is in world "poppedmc_nether":
        if y-coordinate of player > 127:
            execute player command "spawn %player%"
 
I read over the docs for
SCSS:
on player move
, it says "These events can be performance heavy as they are called quite often.", is there a way to do what my script does but without that performance drain?

Code:
on player move:
    if player is in world "poppedmc_nether":
        if y-coordinate of player > 127:
            execute player command "spawn %player%"
I would recommend something like this:
Code:
on walk on bedrock:
   if player is in world "poppedmc_nether":
      if y-coordinate of player > 127:
         cancel event
         execute player command "spawn %player%"
This is I think an easier approach than checking every time a player moves and still will do the same thing pretty much. Also, even though it happens every time a player walks, you can also set up code to prevent a player from placing/breaking blocks if the block below it is bedrock and they are in the nether
 
I would recommend something like this:
Code:
on walk on bedrock:
   if player is in world "poppedmc_nether":
      if y-coordinate of player > 127:
         cancel event
         execute player command "spawn %player%"
This is I think an easier approach than checking every time a player moves and still will do the same thing pretty much. Also, even though it happens every time a player walks, you can also set up code to prevent a player from placing/breaking blocks if the block below it is bedrock and they are in the nether
Oh my god, that's literally what I had the first time. I will revert the changes. Thank you!