PronounsMC
PronounsMC 是一款 Minecraft Spigot 插件,允许玩家设置并显示其代词。它支持多种数据库类型(MySQL 和 SQLite),并通过语言文件提供可自定义的消息。
注意事项
- 需要安装 PlaceholderAPI 才能使用占位符。
- 我们建议使用 ChatInjector 等插件,以便与不支持 PlaceholderAPI 的插件(如 EssentialsX Chat)配合使用。
功能
- 玩家可以通过简单的命令设置和显示其代词。
- 代词支持颜色编码,可通过
config.yml 进行配置。
- 支持使用 MySQL 或 SQLite 存储数据。
- 通过语言文件(例如
lang/en_US.yml)完全自定义消息。
- 无需重启服务器即可重新加载设置和消息。
安装
- 下载 插件 jar 文件并将其放入服务器的
plugins/ 文件夹中。
- 启动服务器 以生成默认配置文件。
- 编辑
config.yml 以配置:
- 数据库类型:选择
mysql 或 sqlite。
- 可用代词:自定义代词列表及其颜色编码格式。
- 语言文件:指定语言文件(默认为
en_US)。
- 重启服务器 或使用
/pronouns reload 应用更改。(不适用于数据库更改)
占位符
| 占位符 |
描述 |
%pronouns_user% |
显示用户的代词。需配合 PlaceholderAPI 使用 |
配置
config.yml
可以在代词中使用颜色格式,如下所示,此为可选操作。
langFile: "en_US"
database:
type: sqlite # 使用 'mysql' 或 'sqlite'
host: localhost
port: 3306
name: minecraft
user: root
password: "password"
userSuppliedPronouns: false # 此设置可能被玩家滥用。
defaultProunounTemplate: "&7(%s)&r"
availablePronouns:
he/him: "&3(&bHe&3/&bHim&3)&r"
she/her: "&5(&dShe&5/&dHer&5)&r"
they/them: "&2(&aThey&2/&aThem&2)&r"
it/its: "&8(&7It&8/&7Its&8)&r"
he/they: "&3(&bHe&3/&bThey&3)&r"
she/they: "&4(&cShe&4/&cThey&4)&r"
xe/xem: "&8(&7Xe&8/&7Xem&8)&r"
ze/zir: "&8(&7Ze&8/&7Zir&8)&r"
lang/en_US.yml
所有面向用户的消息均可在语言文件中进行自定义。示例:
messages:
usageMain: "&c用法: /pronouns <命令>"
usageSet: "&c用法: /pronouns set <代词>"
usageGet: "&c用法: /pronouns get <用户名>"
noPermission: "&c你没有权限使用此命令。"
playerNotFound: "&c未找到玩家!"
invalidPronoun: "&c无效的代词。请使用 /pronouns list 查看可用选项。"
notSet: "&7未设置"
pluginReloaded: "&aPronounsMC 配置已重新加载。"
pronounSet: "&a你的代词已设置为:&r{pronouns}"
availablePronounsHeader: "&a可用的代词:"
playerPronounFormat: "&a{player} 的代词:&r{pronouns}"
playerPronounNone: "&a{player} 的代词:&b未设置" # 用于 /pronouns get <用户名>
onlyPlayers: "&c只有玩家才能设置代词。"
availablePronounsFooter: "&9你也可以通过 /pronouns set <pronoun> 设置自己的代词"
pronounResetTarget: "&a重置 {player} 的代词。"
命令
| 命令 |
描述 |
权限要求 |
/pronouns set <代词> |
将你的代词设置为指定的代词。 |
无 |
/pronouns reset |
重置用户之前设置的代词。 |
无 |
| /pronouns reset <用户> | 重置其他用户的代词 | pronouns.admin |
| /pronouns get <用户> | 显示另一名玩家的代词。 | pronouns.get |
| /pronouns list | 列出所有可用的代词。 | 无 |
| /pronouns reload | 重新加载配置和语言设置。 | pronouns.reload |
权限
| 权限 |
描述 |
默认值 |
pronouns.get |
允许获取其他玩家的代词。 |
OP |
pronouns.reload |
允许重新加载配置和语言文件。 |
OP |
pronouns.admin |
允许重置其他用户的代词。 |
OP |
数据库支持
MySQL
要使用 MySQL:
- 在
config.yml 中设置 database.type: mysql。
- 配置
host、port、name、user 和 password。
SQLite
要使用 SQLite:
- 在
config.yml 中设置 database.type: sqlite。
- 插件将在插件文件夹中创建一个
pronouns.db 文件。
许可证
本项目基于 Apache License 2.0 许可协议授权。
贡献
欢迎贡献!参与方式如下:
- Fork 本仓库。
- 创建一个新的功能分支。
- 提交一个 Pull Request,说明你的更改内容。
感谢使用 PronounsMC
PronounsMC
PronounsMC is a Minecraft Spigot plugin that allows players to set and display their pronouns. It supports multiple database types (MySQL and SQLite) and provides customizable messages via language files.
Notes
- PlaceholderAPI is required for placeholders.
- We reccomend using a plugin like ChatInjector for use with plugins that don't support PlaceholderAPI like EssentialsX Chat.
Features
- Players can set and display their pronouns using simple commands.
- Pronouns are color-coded and configurable via
config.yml.
- Supports MySQL or SQLite for data storage.
- Fully customizable messages via language files (e.g.,
lang/en_US.yml).
- Reload settings and messages without restarting the server.
Installation
- Download the plugin jar file and place it in your server's
plugins/ folder.
- Start your server to generate the default configuration files.
- Edit
config.yml to configure:
- Database type: Choose between
mysql or sqlite.
- Available pronouns: Customize the list of pronouns and their color-coded formats.
- Language file: Specify the language file (default:
en_US).
- Restart your server or use
/pronouns reload to apply changes. (Does not work for database changes)
Placeholders
| Placeholder |
Description |
%pronouns_user% |
Displays users pronouns. Works with PlaceholderAPI |
Configuration
config.yml
Colour formatting can be used in pronouns as shown below, this is optional.
langFile: "en_US"
database:
type: sqlite # Use either 'mysql' or 'sqlite'
host: localhost
port: 3306
name: minecraft
user: root
password: "password"
userSuppliedPronouns: false # This setting can be abused by players.
defaultProunounTemplate: "&7(%s)&r"
availablePronouns:
he/him: "&3(&bHe&3/&bHim&3)&r"
she/her: "&5(&dShe&5/&dHer&5)&r"
they/them: "&2(&aThey&2/&aThem&2)&r"
it/its: "&8(&7It&8/&7Its&8)&r"
he/they: "&3(&bHe&3/&bThey&3)&r"
she/they: "&4(&cShe&4/&cThey&4)&r"
xe/xem: "&8(&7Xe&8/&7Xem&8)&r"
ze/zir: "&8(&7Ze&8/&7Zir&8)&r"
lang/en_US.yml
All user-facing messages are customizable in the language file. Example:
messages:
usageMain: "&cUsage: /pronouns <command>"
usageSet: "&cUsage: /pronouns set <pronoun>"
usageGet: "&cUsage: /pronouns get <username>"
noPermission: "&cYou don't have permission to use this command."
playerNotFound: "&cPlayer not found!"
invalidPronoun: "&cInvalid pronoun. Use /pronouns list to see available options."
notSet: "&7Not set"
pluginReloaded: "&aPronounsMC config reloaded."
pronounSet: "&aYour pronouns have been set to: &r{pronouns}"
availablePronounsHeader: "&aAvailable pronouns:"
playerPronounFormat: "&a{player}'s pronouns: &r{pronouns}"
playerPronounNone: "&a{player}'s pronouns: &bNot set" # Used for /pronouns get <username>
onlyPlayers: "&cOnly players can set pronouns."
availablePronounsFooter: "&9You can also set your own pronouns using /pronouns set <pronoun>"
pronounResetTarget: "&aReset pronouns for {player}."
Commands
| Command |
Description |
Permission |
/pronouns set <pronoun> |
Sets your pronouns to the specified pronoun. |
None |
/pronouns reset |
Resets previously set pronouns by user |
None |
/pronouns reset <user> |
Resets other users pronouns |
pronouns.admin |
/pronouns get <user> |
Displays the pronouns of another player. |
pronouns.get |
/pronouns list |
Lists all available pronouns. |
None |
/pronouns reload |
Reloads the configuration and language. |
pronouns.reload |
Permissions
| Permission |
Description |
Default |
pronouns.get |
Allows retrieving another player's pronouns. |
OP |
pronouns.reload |
Allows reloading the configuration and language. |
OP |
pronouns.admin |
Allows resetting other users pronouns. |
OP |
Database Support
MySQL
To use MySQL:
- Set
database.type: mysql in config.yml.
- Configure
host, port, name, user, and password.
SQLite
To use SQLite:
- Set
database.type: sqlite in config.yml.
- The plugin will create a
pronouns.db file in the plugin folder.
License
This project is licensed under the Apache License 2.0.
Contribution
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new feature branch.
- Submit a pull request explaining your changes.
Thanks for using PronounsMC
评论 0
登录后参与评分
还没有评论,来抢沙发吧