# NanoPromoCode #
为什么你需要这个插件?在某个时候,你可能会与内容创作者合作以吸引受众到你的服务器。这个插件允许你为每个创作者创建一个促销代码,并跟踪他们的促销代码被使用的次数。这样,你就可以有效地了解哪些创作者对服务器玩家群有最大的影响,并鼓励新玩家加入服务器(通过使用促销代码来获得奖励)。
**命令:**
- /promo <促销代码> - 使用促销代码,不需要任何权限。
- /promo add <促销代码> - 用于创建促销代码,需要 **nano.add.promo** 权限。
- /promo refresh <昵称> - 用于让玩家再次使用促销代码一次,需要 **nano.refresh.stats.promo** 权限。
**配置:**
```
# 连接到 MySQL 数据库
Database:
Address: '127.0.0.1'
Port: '3306'
Database: 'database_name'
Username: 'database_username'
Password: 'database_password'
# 你可以使用命令和占位符: %player%
promo-rewards:
- 'give %player% diamond 64'
```
config.yml 用于提供 MySQL 数据库信息以及将作为玩家奖励执行的命令(基本上任何命令,无限数量的命令,使用命令奖励玩家有无限的选择)。
**语言:**
```
# 你可以使用颜色代码来更改消息的颜色。
# 一些消息有占位符,你可以根据需要使用它们。
only-player-usage-warning: "&cOnly players can use this command!"
incorrect-promo-code-warning: "&cYou should use correct promo code!"
refresh-promo-code-permission-warning: "&cYou don't have permission to refresh promo codes!"
refresh-promo-code-name-warning: "&cYou have to specify name of the player to refresh the promo code."
promo-code-successfully-refreshed: "&aPromo code successfully refreshed for player:"
unable-to-refresh-promo-code: "&cUnable to refresh promo code for player:"
add-promo-code-permission-warning: "&cYou don't have permission to add promo codes!"
add-promo-code-no-code-warning: "&cPlease provide a promo code to add."
add-promo-code-success: "&aPromo code %promo_code% has been created successfully!"
add-promo-code-already-exist-warning: "&cThis promo code already exists!"
add-promo-code-error: "&cAn error occurred while creating the promo code. Please try again."
promo-code-does-not-exist: "&cThe promo code you entered does not exist."
promo-code-activated: "&aYou successfully activated the promo code!"
promo-code-already-used: "&cYou have already used the promo code!"
promo-code-activation-error: "&cAn error occurred while processing the promo code. Please try again."
```
language.yml 让你能够本地化插件。默认语言是纯粹而甜美的英语。