From bc2da3907b9bc632202713b16d49063c8526de84 Mon Sep 17 00:00:00 2001 From: Thijs Wiefferink Date: Mon, 11 Apr 2016 11:05:09 +0200 Subject: [PATCH] Add automatic teleporting to region after buying/renting section --- Frequently-Asked-Questions.md | 36 ++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/Frequently-Asked-Questions.md b/Frequently-Asked-Questions.md index b7c3094..4ac2d07 100644 --- a/Frequently-Asked-Questions.md +++ b/Frequently-Asked-Questions.md @@ -153,4 +153,38 @@ To generate the correct `tellraw` messages with a site like [Tellraw Generator]( You can use a plugin like [BoosCooldowns](http://dev.bukkit.org/bukkit-plugins/booscooldowns/) to set warmup and cooldows for commands. Check [Issue #60](https://github.com/NLthijs48/AreaShop/issues/60) for reasons I'm not implementing adding this to AreaShop itself. #### How can I let signs show the time left instead of the end time of a rental? -In the `signProfiles` section of `config.yml` you can change the `%untilshort%` variable to a `%timeleft%` (you can find it in the `rented` sign state) variable to show the time that is left instead of the end time. This will help to prevent confusion because of time zones being different for the player and the server. \ No newline at end of file +In the `signProfiles` section of `config.yml` you can change the `%untilshort%` variable to a `%timeleft%` (you can find it in the `rented` sign state) variable to show the time that is left instead of the end time. This will help to prevent confusion because of time zones being different for the player and the server. + +### How do I let a player automatically teleport to a region after he bought/rented it? +Set the 'eventCommandProfiles' section of the config to the following (assuming you have Essentials installed which provides the `sudo` command): +```yaml +eventCommandProfiles: + default: + created: + before: + after: + deleted: + before: + after: + rented: + before: + after: + - "sudo %player% areashop tp %region%" + extended: + before: + after: + unrented: + before: + after: + bought: + before: + after: + - "sudo %player% areashop tp %region%" + sold: + before: + after: + resell: + before: + after: +``` +The listed commands will be executed after a player bought/rented a region and force them to use the teleport command to get to their region. \ No newline at end of file