1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Check if player is in water.

Discussion in 'Requests' started by utol, Feb 23, 2017.

  1. utol

    utol Member

    Joined:
    Feb 10, 2017
    Messages:
    17
    Likes Received:
    1
    Tried many codes in this one, but still can't figure it out!

    Yes, i've searched for a resource but still no

    Here's some attempt codes that i did, that are not working since Water is not a Block.

    Code (Skript):
    1. on command:
    2.     If block under player is water:
    3.         cancel event
    4.         message "&cYou cannot execute a command while in &lwater."
     
    • Like Like x 1
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,176
    Likes Received:
    217
    Code (Skript):
    1. on command:
    2.     If block at player is water:
    3.         cancel event
    4.         message "&cYou cannot execute a command while in &lwater."
    This has worked for me in the past. Did not have time to test, though.
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,176
    Likes Received:
    217
    It work's.
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,176
    Likes Received:
    217
    1st of all, if you need a Plugin Request use the correct format, but, if you need Help with a code or if you have a bug post in "Skript" section :/
    --- Double Post Merged, Feb 27, 2017, Original Post Date: Feb 27, 2017 ---

    and this code works in skellet:
    Code (Skript):
    1. [entity] %entity% (1¦is|2¦is(n't| not)) in water
     
  5. Arjan Snijders

    Joined:
    Sep 8, 2021
    Messages:
    1
    Likes Received:
    0
    How can detect if a player picked up lava or water?
     
  6. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    Not related to the current thread. But it should be the on right click event
     

Share This Page

Loading...