How to check when a player enters a region

Discussion in 'Plugin Development' started by Prothean_IGS, Feb 25, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    So I'm trying to have a count down start when a player enters a specific region using world guard and I imagine I would have to do this with an event, but after searching the worldguard java docs, I cannot seem to find a way how to do this. I know it's possible as there are messages that can pop up when a player walks into a region.

    Can someone point me in the right direction please?
  2. Offline


    Well I haven't worked with the WorldGuard api, ever, but I do think there is a very easy way to do this. Try this link and do as suggested. Use the PlayerMoveEvent to get a location, and fetch a region as stated on the wiki using said location. Now that you have the instance of ProtectedRegion I assume you'll be able to check for specific flags, send messages, ect.

    I hope that helps.
  3. Offline


Thread Status:
Not open for further replies.

Share This Page