How to check if player is in water

  • 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 community!

    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!

Status
Not open for further replies.

Andrew2000

Member
Aug 21, 2017
34
0
0
Skript Version: Skript 2.2 (dev28)
Skript Author: Bensku
Minecraft Version: 1.8.8

Code:
Dont have it .......

How do I check if player is in water and how do I check when they place a block next to stone, it would stop them from doing it. But also the corners aswell

I have tried going to docs but not seen anything about it

Have you tried searching the docs? Yes
Have you tried searching the forums? No
What other methods have you tried to fix it? "if player is in water"
 
You could probaly do something like this, with the water thing:
Code:
Every 2 seconds:
    Loop all players:
        If block above loop-player is "Water":
            #DO STUFF

And for the stone thing, i think you can do this: (I have not tested it!)
Code:
On block place:
    If block around event-block is "Stone":
        #DO STUFF
 
You could probaly do something like this, with the water thing:
Code:
Every 2 seconds:
    Loop all players:
        If block above loop-player is "Water":
            #DO STUFF

And for the stone thing, i think you can do this: (I have not tested it!)
Code:
On block place:
    If block around event-block is "Stone":
        #DO STUFF
on block place:
if block around event-block is portal:
stop

Can't compare 'block around event-block' with a text
 
code_language.skript:
on block place:
    loop blocks in radius 1 of event-block where [block input is not stone]:
        cancel event
 
code_language.skript:
on block place:
    loop blocks in radius 1 of event-block where [block input is not stone]:
        cancel event
The better solution would be
code_language.skript:
on place:
  if blocks in radius 1.9 of event-block where [block input is stone] is set:
    cancel the event
 
Status
Not open for further replies.