[![Modrinth][modrinth-shield]][modrinth-url]
[![Discord][discord-shield]][discord-url]
[![GitHub][github-shield]][github-url]
[![Paypal][paypal-shield]][paypal-url]
[![Supported Minecraft Versions][versions-shield]][versions-url]
---
### 一个 [GriefPrevention][griefprevention-url] 插件,用于向 LuckPerms 权限提供上下文
---
现在支持 [HuskClaims][huskclaims-url]!
**要求**:
- Paper/Forks 1.21+ (不支持 Spigot)
- Java 21+
- [LuckPerms][luckperms-url]
- [GriefPrevention][griefprevention-url] 或 [HuskClaims][huskclaims-url]
## 上下文
| 键 | 描述 | 示例值 |
|-------------------------------------|------------------------------------------|---------------|
| ``griefprevention:claim-id`` | 玩家所在的区块 ID | ``32`` |
| ``griefprevention:in-claim`` | 玩家是否在区块内 | ``true`` |
| ``griefprevention:in-admin-claim`` | 区块是否为管理员区块 | ``false`` |
| ``griefprevention:is-owner`` | 玩家是否是区块所有者 | ``false`` |
| ``griefprevention:trust-access`` | 玩家是否具有访问信任级别* | ``true`` |
| ``griefprevention:trust-build`` | 玩家是否具有建造信任级别* | ``true`` |
| ``griefprevention:trust-edit`` | 玩家是否具有编辑信任级别* | ``false`` |
| ``griefprevention:trust-inventory`` | 玩家是否具有物品栏信任级别* | ``true`` |
| ``griefprevention:trust-manage`` | 玩家是否具有管理信任级别* | ``false`` |
**注意: 区块所有者默认所有信任级别上下文为 ``true``,如果他们在自己的区块内*
对于 HuskClaims:
- 将 ``griefprevention:`` 替换为 ``huskclaims:`` 在上下文键中
- HuskClaims 没有 ``claim-id`` 键
- 支持自定义信任级别!
如果您需要任何帮助或支持,请加入[discord][discord-url]!
## 示例设置:
想防止玩家在没有建造信任的区块内设置家园吗?您可以执行以下操作
- 将 ``essentials.sethome`` 设置为 ``true``,如同往常一样。
- 将 ``essentials.sethome`` 设置为 ``false``,上下文 ``griefprevention:trust-build`` 设置为 ``false``
![GP Contexts Permissions][perms-example-img]
---
此插件使用 [bStats][bstats-url]。您可以在 bStats 配置中选择退出
[![bStats for qTemplate Plugin][bstats-plugin-svg]][bstats-plugin-url]
[luckperms-url]: https://luckperms.net/
[griefprevention-url]: https://modrinth.com/plugin/griefprevention
[huskclaims-url]: https://www.spigotmc.org/resources/huskclaims-1-17-1-21-modern-golden-shovel-land-claiming-fully-cross-server-compatible.114467/
[perms-example-img]: https://github.com/QarthO/qGP-Contexts/blob/main/img/luckperms-example.png?raw=true
[modrinth-shield]: https://img.shields.io/badge/Download-00AF5C?logo=modrinth&logoColor=white&style=for-the-badge
[modrinth-url]: https://modrinth.com/plugin/qGP-Contexts
[discord-shield]: https://img.shields.io/badge/Discord-5865F2?logo=discord&logoColor=white&style=for-the-badge
[discord-url]: https://quartzdev.gg/discord/
[github-shield]: https://img.shields.io/badge/Source-181717?logo=github&logoColor=white&style=for-the-badge
[github-url]: https://github.com/qartho/qGP-Contexts
[paypal-shield]: https://img.shields.io/badge/Donate-00457C?logo=paypal&logoColor=white&style=for-the-badge
[paypal-url]: https://quartzdev.gg/paypal/
[versions-shield]: https://img.shields.io/badge/1.21+-blue?style=for-the-badge&label=Minecraft%20Versions
[versions-url]: https://modrinth.com/plugins/qGP-Contexts
[bstats-url]: https://bstats.org/
[bstats-plugin-svg]: https://bstats.org/signatures/bukkit/qGP-Contexts.svg
[bstats-plugin-url]: https://bstats.org/plugin/bukkit/qGP-Contexts/