Skip to content

Frequently Asked Questions

Thijs Wiefferink edited this page Feb 22, 2018 · 22 revisions

Quick select:


How to disable the greeting messages that AreaShop regions have?

If you don't want the greetings then you can disable them like this:

  1. Open the default.yml file that is inside the AreaShop folder
  2. Scroll to the flagProfile section
  3. Change each line that starts with greeting: to this: greeting: ''
  4. Save the file, then use /as reload or restart your server.

Why can't the buyer/renter of the region build inside of it?

There are a couple common problems that cause this, try these things:

When the players gets a message from WorldGuard like "Hey! Sorry, but you can't place that block here.":

  • Make sure there is no build, block-break and block-place flags on the __global__ region. Remove those flags with /rg flag __global__ <flag> and instead set passthrough to deny with /rg flag __global__ passthrough deny. This change will make everything protected by default, while still allowing other regions to override protections.
  • Make sure that all other regions that are at the same spot of the AreaShop region have no build, block-break and block-place flags. Regions are protected by default, so these flags are not required and will cause issues.
  • Make sure that the AreaShop region has the highest priority (AreaShop sets it to 10 by default).
  • Make sure /as info region <region> indicates that the region has been bought/rented, if it does not: rent/buy the region.
  • Make sure /rg info <region> shows at least one owner/member, if it does not: reset your flagProfile section in the default.yml file to the one listed in the standard config.
  • Make sure the walls/floor/ceiling of your region are not made of concrete. There is a bug in WorldGuard that prevents placing blocks against concrete, even it players are supposed to be able to do that.

No message at all:

  • Check that spawn-protection is set to 0 in the server.properties file, otherwise non-OP players cannot build in a certain area around spawn.

Another message:

  • Most likely another plugin is blocking block placement, you might be able to find out which one if you follow these steps:
    1. Look at a block in the AreaShop region.
    2. Use /wg debug testplace <player>, use the name of the player you are testing with.
    3. It will show in chat if the block placement has been blocked, and by which plugin.
  • The same as above works for breaking blocks, use testbreak instead of testplace, and make sure you are looking at a block inside the region, not at the wall/floor/ceiling.

How can I set the buyer/renter as owner of a region instead of member?

Quick answer: Replace members: in the flagProfiles section of the config.yml file to owners: and then use /as reload.

You can completely customize which WorldGuard flags AreaShop should set for regions, including how it should add the renter/buyer, and friends. The flagProfiles section in the config.yml file contains all options for WorldGuard flags. Currently there are 5 states a region can be in (forrent, rented, forsale, sold, resale), for each of these you can set the flags that you want. \Things that might help you:

  • You can set the priority of a region here just like you would set a flag, this helps if you have other regions interfering (add the line to all states).
  • You can set group flags to for example only give access to chests for the renter of the region: chest-access: 'deny g:non_members'
  • You can use all variables in these flags as defined in the config.
  • The owners and members flag take UUIDs as arguments, but also accept names (n:<name>), and permission groups (g:<group>).
  • Use '' as value of a flag to reset it.

How to setup different limits for different players groups and worlds? (how many regions each player can buy)

First of all read the text above the limitGroups config section inside the config.yml file, that is the basic information you need. An advanced example about most aspects of the limitGroups section can be found here: advanced limitgroups setup examples.

What happens when a player changes his name?

General notes:

  • If you have your server in offline mode (and are not using the bungeecord: true setting for when you have a BungeeCord network) then a player will lose his bought regions anyway because the UUID's returned by Bukkit/Spigot will change anyway.
  • Even when the sign and/or greeting is showing an old name, the correct player will still be paying for the region. That is because AreaShop uses UUID's and that ensures the correct player is accounted for, the old names on signs/greetings is simply because those did not get updated yet (starting from AreaShop V2.1.5 they automatically update).

Using AreaShop V2.1.5 or higher:

  • Name changes are fully supported and should give no trouble at all. When a player with a changed name logs in AreaShop will detect a name change and then updates all of his regions. That ensures that even when you use WorldGuard 5.X the player will immediately have access to his region again and also ensures that the signs and greeting messages show the new name of the player.

Using an older AreaShop version:

  • Update if you can, that is simply the best idea to handle it best (be sure to backup your server before upgrading as always).
  • Since AreaShop V1.3.0 the players that bought/rented a region are saved with their UUID instead of their name, so from this version a user would be registered correctly in the system of AreaShop even after changing his name.
  • If you use AreaShop V2.1.0 or higher in combination with WorldGuard 6.0 or higher then the user should be able to use his regions as normal directly after his name change (after re-logging with the new name of course), but the old name is still displayed on the signs and in the greeting message (manually update with /as updaterents and /as updatebuys, or simply update to the latest AreaShop to automate it)
  • If you use a version of AreaShop between V1.3.0 and V2.1.0 or WorldGuard 5.9, then the AreaShop region of the player that changed his name will need to be updated first before he can use it again. You can do this by using /as updaterents and/or /as updatebuys. (WorldGuard 5.9 uses names as members/owners of regions, so AreaShop could not properly add a player, but could only update it after a player changed his name)

How to prevent players from opening chests in regions that other players bought/rented?

To prevent other players from opening and using chests in regions that are bought/rented you can add a line to the flagProfiles section in the config.yml file. The flagProfiles section describes which flags AreaShop should add to the WorldGuard region and which value they should have. To disable using chests you can add the following line: chest-access: deny g:non_members, that would disallow using chest for anyone that is not a member or owner of the region. The complete flagProfiles section in the config could look something like this after you added it:

flagProfiles:
  default:
    forrent:
      members: ''
      greeting: '%lang:prefix%%lang:greeting-forrent%'
      chest-access: 'deny g:non_members'
    rented:
      members: '%uuid%, %friendsuuid%'
      greeting: '%lang:prefix%%lang:greeting-rented%'
      chest-access: 'deny g:non_members'
    forsale:
      members: ''
      greeting: '%lang:prefix%%lang:greeting-forsale%'
      chest-access: 'deny g:non_members'
    sold:
      members: '%uuid%, %friendsuuid%'
      greeting: '%lang:prefix%%lang:greeting-bought%'
      chest-access: 'deny g:non_members'
    resale:
      members: '%uuid%, %friendsuuid%'
      greeting: '%lang:prefix%%lang:greeting-resale%'
      chest-access: 'deny g:non_members'

The above assumes that you also want players unable to interact with chests if the region is not rented or bought. If you however want to allow raiding of abandoned regions you can change the chest-access lines of the forrent and forsale sections to the following: chest-access: 'allow', which allows anyone to use the chests.

How can I use items as currency to pay for regions of AreaShop?

AreaShop supports all economy plugins that are supported by Vault, so if you want to use items as currency then you need an economy plugin that has that and also works with Vault. The Gringotts economy should work for this purpose, this plugin has been successfully used by a couple AreaShop users. There might be other suitable plugins to do the same thing though.

How do I require players to confirm that they want to rent/unrent/buy/sell their region?

Because clicking a sign to rent/unrent can be a bit too easy sometimes, you might want to have confirmation messages. You can add those by changing the signProfiles in the config.yml file to send a /tellraw message to the user instead of immediately buying/renting a region. This will mean that the player will first get a message in chat asking to confirm, and the player can click the confirm text of the message to perform the action.

To get confirmation messages copy the signProfile below to your config.yml file, below the default one.

  confirm:
    forrent:
      line1: '&2&l[For Rent]'
      line2: '%region%'
      line3: '%duration%'
      line4: '%price%'
      rightClickConsole:
      - 'tellraw %clicker% [{"text":"[Areashop]","color":"dark_green"},{"text":" Are you sure you want to rent region %region%? ","color":"white"},{"text":"[Yes, go ahead]","color":"dark_green","clickEvent":{"action":"run_command","value":"/areashop rent %region%"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to rent %region%"}]}}}]'
      leftClickPlayer:
      - 'areashop info region %region%'
    rented:
      line1: '&4&l[Rented]'
      line2: '%region%'
      line3: '%player%'
      line4: '%untilshort%'
      rightClickConsole:
      - 'tellraw %clicker% ["",{"text":"[Areashop]","color":"dark_green"},{"text":" Are you sure you want to extend the rent of region %region%? ","color":"white"},{"text":"[Yes, go ahead]","color":"dark_green","clickEvent":{"action":"run_command","value":"/areashop rent %region%"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to extend %region%"}]}}}]'
      leftClickPlayer:
      - 'areashop info region %region%'
      shiftRightClickConsole:
      - 'tellraw %clicker% ["",{"text":"[Areashop]","color":"dark_green"},{"text":" Are you sure you want to unrent region %region%? ","color":"white"},{"text":"[Yes, go ahead]","color":"dark_green","clickEvent":{"action":"run_command","value":"/areashop unrent %region%"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to unrent %region%"}]}}}]'
    forsale:
      line1: '&2&l[For Sale]'
      line2: '%region%'
      line3: '%price%'
      line4:
      rightClickConsole:
      - 'tellraw %clicker% ["",{"text":"[Areashop]","color":"dark_green"},{"text":" Are you sure you want to buy region %region%? ","color":"white"},{"text":"[Yes, go ahead]","color":"dark_green","clickEvent":{"action":"run_command","value":"/areashop buy %region%"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to buy %region%"}]}}}]'
      leftClickPlayer:
      - 'areashop info region %region%'
    resell:
      line1: '&9&l[Resale]'
      line2: '%region%'
      line3: '%resellprice%'
      line4: '&8%player%'
      rightClickConsole:
      - 'tellraw %clicker% ["",{"text":"[Areashop]","color":"dark_green"},{"text":" Are you sure you want to buy region %region% from %player%? ","color":"white"},{"text":"[Yes, go ahead]","color":"dark_green","clickEvent":{"action":"run_command","value":"/areashop buy %region%"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to buy %region% from %player%"}]}}}]'
      leftClickPlayer:
      - 'areashop info region %region%'
      shiftRightClickConsole:
      - 'tellraw %clicker% ["",{"text":"[Areashop]","color":"dark_green"},{"text":" Are you sure you want to stop reselling region %region%? ","color":"white"},{"text":"[Yes, go ahead]","color":"dark_green","clickEvent":{"action":"run_command","value":"/areashop stopresell %region%"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to stop reselling %region%"}]}}}]'
    sold:
      line1: '&4&l[Sold]'
      line2: '%region%'
      line3: '%player%'
      line4:
      leftClickPlayer:
      - 'areashop info region %region%'
      shiftRightClickConsole:
      - 'tellraw %clicker% ["",{"text":"[Areashop]","color":"dark_green"},{"text":" Are you sure you want to sell region %region%? ","color":"white"},{"text":"[Yes, go ahead]","color":"dark_green","clickEvent":{"action":"run_command","value":"/areashop sell %region%"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click to sell %region%"}]}}}]'

To switch to the signProfile with the confirmation messages you have to set the signProfile setting inside the default.yml file to confirm (alternatively you can set this profile only for region in a certain group, individual regions or individual signs).

To generate the correct tellraw messages with a site like Tellraw Generator, or you could change the above messages to your liking.

How can I set a delay for the teleporting commands (/as tp, /as find)?

You can use a plugin like BoosCooldowns to set warmup and cooldows for commands. Check Issue #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.

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):

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.

How do I add tax to a buy region?

You cannot directly add a tax, however you can change it into a rental region for which you pay more the first time. This would achieve the same thing, for example buying a region for 1000, and then paying 50 each week to keep it.

First set the price of the region to the initial price you want to charge (1000 in this example). Then change the eventCommandProfiles section in config.yml to the following to setup the tax:

eventCommandProfiles:
  default:
    created:
      before:
      after:
    deleted:
      before:
      after:
    rented:
      before:
      after:
      - "areashop setprice 50 %region%"
    extended:
      before:
      after:
    unrented:
      before:
      after:
      - "areashop setprice 1000 %region%"
    bought:
      before:
      after:
    sold:
      before:
      after:
    resell:
      before:
      after:

Why is my custom profile not working? (flagProfile, signProfile, etc.)

You probably did not assign the profile to a region or region group correctly. One thing to note is that names of profiles have nothing to do with region group names, they are not automatically linked. To set a profile for a region group you need to have something like this in your groups.yml file (the general: line and profile lines are important to add):

mallshops:
  name: mallShops
  priority: 0
  general:
    flagProfile: aFlagProfileName
    signProfile: aSignProfileName
  regions:
  - mall01
  - mall02

How can I use a price per square meter (m2) or per block (m3)?

Added in AreaShop 2.5.0+ (current development builds)

You can set a price using the region variables and complete JavaScript expressions (result of the last statement is used):

Charge $5 per square meter:

price: '5*%width%*%depth%'

Charge $5 per block (%volume% properly calculates the blocks of odd shaped regions):

price: '5*%volume%'

You can put this in default.yml, a group in groups.yml or in a region file. You cannot set a price like this using /as setprice for security reasons.

Clone this wiki locally