# 变量符

## 一、介绍

您可以在其他插件（如计分板）使用 PlotSquared 的变量符，同时也可以在 PlotSquared 的某些场合使用其他插件的变量符. 例如 `/plot flag set greeting Welcome %player_name%` 即为在玩家进入地皮时显示其游戏名称的例子.

## 二、设置

要想实现此功能，您需要遵从如下步骤：

* 安装插件 [**PlaceholderAPI**](https://www.spigotmc.org/resources/placeholderapi.6245/) 或者 [**MVdWPlaceholderAPI**](https://www.spigotmc.org/resources/mvdwplaceholderapi.11182/).
* 打开 `setting.yml`，并找到 `external-placeholders` 选项，查看其值是否为 `true`. 如果不是，您需要修改. 修改后的效果如下：

```
 external-placeholders: false
```

* 重启服务器.
* 在你想要使用的地方添加变量符.

## 三、本插件提供的变量符列表

| 变量符                                              | 描述                                     |
| ------------------------------------------------ | -------------------------------------- |
| `%plotsquared_currentplot_alias%`                | 地皮名称                                   |
| `%plotsquared_currentplot_owner%`                | 地皮主人                                   |
| `%plotsquared_currentplot_members%`              | 地皮白名单成员数量                              |
| `%plotsquared_currentplot_members_added%`        | 通过 /plots add 添加的地皮白名单成员数量             |
| `%plotsquared_currentplot_members_added_list%`   | 通过 /plots add 添加的地皮白名单成员列表             |
| `%plotsquared_currentplot_members_trusted%`      | 通过 /plots trust 添加的地皮白名单成员数量           |
| `%plotsquared_currentplot_members_trusted_list%` | 通过 /plots trust 添加的地皮白名单成员列表           |
| `%plotsquared_currentplot_members_denied%`       | 地皮黑名单成员数量                              |
| `%plotsquared_currentplot_members_denied_list%`  | 地皮黑名单成员列表                              |
| `%plotsquared_currentplot_world_name%`           | 当前地皮世界名称                               |
| `%plotsquared_currentplot_can_build%`            | 显示玩家是否可以在脚下地皮建筑（即是否有该地皮的建筑权限）          |
| `%plotsquared_world_name%`                       | 当前世界名称                                 |
| `%plotsquared_has_plot%`                         | 显示玩家是否有地皮                              |
| `%plotsquared_has_plot_(地皮世界名称)%`                | 显示玩家在对应地皮世界是否有地皮                       |
| `%plotsquared_plot_count%`                       | 显示玩家拥有的地皮数量                            |
| `%plotsquared_plot_count_(地皮世界名称)%`              | 显示玩家在对应地皮世界的地皮数量                       |
| `%plotsquared_allowed_plot_count%`               | 显示玩家可以拥有的地皮数量上限                        |
| `%plotsquared_currentplot_xy%`                   | 显示当前地皮的 X 和 Y ID                       |
| `%plotsquared_currentplot_x%`                    | 显示当前地皮的 X ID                           |
| `%plotsquared_currentplot_y%`                    | 显示当前地皮的 Y ID                           |
| `%plotsquared_currentplot_rating%`               | 显示当前地皮的评价                              |
| `%plotsquared_currentplot_biome%`                | 显示当前地皮的生物群系                            |
| `%plotsquared_currentplot_localflag_<标签>%`       | 显示当前地皮对应标标签的值                          |
| `%plotsquared_currentplot_flag_<标签>%`            | 同上，但若玩家没有设置，则显示 worlds.yml 中的默认的对应标签的值 |
| `%plotsquared_currentplot_creationdate%`         | 显示当前地皮的创建日期                            |
