Perform action if player is standing on sponge on world guard region

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

AIGLE25

Member
Nov 8, 2023
11
0
1
19
Category: action/event

Suggested name: kill or tp

What I want:

Hello , i want to make player falling if standing on a sponge block and wet sponge (forbide players standing on it) to disallow bridging with sponge on a certain region of world guard , i can't make my server public because of this :/

i already tryed this:

on enter region: ← idk how to specify a region
if block below player is sponge:
kill player
send "&6You are &4not&6 allowed to stand on a lucky block in this area!"
on steping on sponge:
if "%region at player%" contains "test":
kill player
send "&6You are &4not&6 allowed to stand on a lucky block in this area!"

Ideas for fix: loop check if block under player is sponge on the rigion and check if sponge is under , under right and under left the player on
~x ~y-0.1 ← (under block check already do it) y-0.01 and y+0.01 (see screenshot) to avoid : https://streamable.com/vw4id7


Ideas for permissions: Maybe stand.sponge


When I'd like it by: not urgent

i have skript 2.6.5
 

Attachments

  • exp.png
    exp.png
    136.6 KB · Views: 97
  • exp.png
    exp.png
    136.6 KB · Views: 90
i probably need to have a check if block under player if another block than sponge and air , if yes then don't kill player

on region enter:
while player is online:
if "%region at player%" contains "test":
set {_locA} and {_locB} to block at player's location
remove 1 from {_locA}'s y-coord and {_locB}'s y-coord
add 1 to {_locA}'s x-coord and {_locA}'s z-coord
remove 1 from {_locB}'s x-coord and {_locB}'s z-coord
loop all blocks within {_locA} and {_locB} :
if loop-block is sponge:
broadcast "kill"
wait 10 ticks
But i don't know how to do this
 
So can you summarise that please. Are you just trying to kill a player if they are standing on a lucky block in a specific region?