Jump to content

on region enter:


nimajnb

Recommended Posts

  • 2 months later...

 You're not giving nearly enough information about your issue, "not detecting" could mean it's not detecting the syntax or the syntax is valid but it's not detecting you entering the region. In the case of the latter, that'd be your case.

A few things to note

  1. within the on region enter event, region at player != event-region. Region at player will grab the region of the player before they enter the region. event-region, obviously, returns the region that the player is about to enter (or already has entered depending on how you want to view it)
  2. worldguard syntaxes do not work with skript if you are running fastasyncworldedit with worldguard, you must run worldedit and worldguard if you want these syntaxes to be recognised by skript
  3. you can not directly compare regions with text, you must parse the region as a string/text first (see below)
  4. regions, even after parsing them as strings, are formatted in the form "<region> in world <world>". Because of this, we use contains instead of a direct comparison (see below again)

 

A valid example of the on region enter event:

on region enter:
    if "%event-region%" contains "<insert your region name here>":
      cancel event
      send "&cYou can not enter here!" to player

 

Hope this helps, Ofus.

Link to comment
Share on other sites

@Ofus, this helped me by just looking. Ive always wondered why worldguard was not working in skript. Its because i have fastasyncworldedit good to know!

Thanks friend!

 

Active Minehut Player since 2016

Advanced at Skript - Know a lot about running a server 

If you need help with anything contact me @ KJPAKA#0001

 

Link to comment
Share on other sites

  • 3 years later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...