WorldGuard Region Commands
WorldGuard Region Commands
"WorldGuard" extension to make the server/a player automatically execute a command when he enters or leaves a WorldGuard region.
How to use this?
this plugin adds some new region flags to worldguard: player-enter-command, player-leave-command, server-enter-command and server-leave-command.
Each of these flags can store multiple commands that are separated with a comma. The player-enter-command and player-leave-command commands will be executed by the player who enters/leaves a region. The server-enter-command and server-leave-command commands will be executed by the server if a player enters/leaves the region.
so simply use the usual WorldGuard region command, like this:
/region flag <region> player-enter-command /list
to make the player execute /list, or
/region flag <region> server-leave-command /say Someone left the region.
to make the server execute the /say command when a player leaves the region.
You can use
/region flag <region> player-leave-command
to clear the value of the flag.
Additionally some substrings will be replaced:
- {player} will be replaced with the name of the player who entered/left the region
- {region} will be replaced with the name of the region the player entered/left
- {comma} will be replaced with a comma as it is normally used to execute multiple commands
Permissions
- none yet
Dependencies
The plugin requires the latest WorldGuard Custom Flags and WorldGuard Region Events.
Click here for some other plugins using WorldGuard Custom Flags.
Problems ?
If you have problems with this plugin read the F.A.Q.. If this did not help you, you can receive help here.
Trying to use this with 1.7.10 but I get a huge error log, it is conflicting with WorldGuard. Please update.
After installation my enderpearl deny flag that comes built in with WG stopped working. Any ideias why?
@bundy_mc
You might like to look at the VariableTriggers plugin. Use WGRegionCommand to call a script you create with VariableTriggers. That is why I am trying to get WGRC working on my server without success. If anyone can help me with this, I have posted the details of my problems here: WG Custom Flags Forum.
Is there any way to make the player-enter and player-leave-command "player" specific?
I would like to run a command whenever a particular owner/admin enters a region. This would create a "player" detection capability that isn't currently available.
For aexample, when combined with a plugin like "Holographic Displays", it could change my status when I'm online. It would run a command like "/hd setline bundy-status 2 &aon" whenever I enter a region. We have a staff lounge that we spawn into, so when I leave the lounge, it would show that I'm "on" on ready to help members.
Thanks, bundy
@der_mewin
Tested it on my dev server, worked great, popped it on the production server.. All is well :)
Thanks again for creating and maintaining such a useful plugin!
@joannou1
Not a big deal ;)
WGRegionEvents for WG 6: http://ci.mewin.de/job/WGRegionEvents/
WGRegionCommands for WG 6: https://ci.mewin.de/job/WGRegionCommands/
This is untested yet, if it does not work, just report it again ;) .
@der_mewin
That's amazing, thank you! It seems to have helped a bit, but it's still spamming whenever a player moves:
http://pastebin.com/TgwU05em
@joannou1
I already created a beta version of WGCustomFlags for WorldGuard 6 which you can get here. Please try this and tell me about any problems ;) .
Hey, I cannot thank you enough for this plugin... I've been able to do the impossible quite easily for the past while now.
But I just upgraded WorldGuard to the new 6.0 version, and it broke compatibility with all the WG Region plugins you have made...
See pastebin for example: http://pastebin.com/g1BScrNL
If you could somehow fix it so it works again, even a little, that would be amazing.. I rely on this plugin so much now that it's hard to live without it.
@Maximvdw
I found a work around for this problem
Use a plugin called Command Delay:
http://dev.bukkit.org/bukkit-plugins/command-delay/
Set the region to fire a delayed command to fire after 1 second
This works for me with Dragon Travel, for example I used:
/rg flag greeting server-enter-command cd 1 s dt flight valcraft {player}
@Maximvdw
I am also having this problem
http://dev.bukkit.org/paste/10508/
@jacob5jac
The server can do /warp [warp] (player) - Will teleport (player) to the warp [warp]
This will work regardless if they have permission to that warp or not.
@auranore
im trying to do something like this too, but with /warp, i have been looking forever and i need to get other things done :/
anyone know how to use this, or something to force the player run the command as an op instead of a normal player?
i want to make my player warp to a point, but i dont want them to have access to said warp all the time, just when they enter my region, then have them warp.
please help
@Meastrofer5
Yes, simply seperate them with a comma.
can i set more commands ?
@Maximvdw
That would be good, let's hope the developer does this so that we can run this with Spigot.
@auranore
That is possible? thats another flag :) xd
I'm attempting to use this to both heal and clear an inventory of a player when they enter a region, it works sort of, but if they dont have permission to /heal or /clear it wont work for them. is there a way to make it execute those commands ON the player but FROM the console?
is there a way to flag a region like its already flaged deny and the things we want to add just flag it allow you get me?
like lets say i /region define Spawn
then i do /region flag Spawn (flag)
but instead of adding all of them 1 by 1 is there a command that flags it all to deny
Commands get executed async. Please make it sync. Plugins that change things to the world, scoreboard or any other control that is not allowed to be accesed async will break with this plugin. Everything in your code may be async but the code that sends the command has to be sync.
Regards,
Maxim