1
mirror of https://github.com/CarmJos/UserPrefix.git synced 2024-09-19 20:15:47 +00:00
UserPrefix/README-en.md

134 lines
5.5 KiB
Markdown
Raw Normal View History

2022-01-07 00:45:46 +00:00
![BANNER](.documentation/images/banner.png)
2021-09-17 10:53:20 +00:00
README LANGUAGES [ [中文](README.md) | [**English**](README-en.md) ]
2021-09-17 10:53:20 +00:00
# UserPrefix Plugin
[![CodeFactor](https://www.codefactor.io/repository/github/carmjos/userprefix/badge?s=b76fec1f64726b5f19989aace6adb5f85fdab840)](https://www.codefactor.io/repository/github/carmjos/userprefix)
2021-09-17 14:00:22 +00:00
![CodeSize](https://img.shields.io/github/languages/code-size/CarmJos/UserPrefix)
[![License](https://img.shields.io/github/license/CarmJos/UserPrefix)](https://opensource.org/licenses/GPL-3.0)
2021-09-17 10:53:20 +00:00
[![Java CI with Maven](https://github.com/CarmJos/UserPrefix/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/CarmJos/UserPrefix/actions/workflows/maven.yml)
2021-09-17 14:00:22 +00:00
![Support](https://img.shields.io/badge/Minecraft-Java%201.8--Latest-yellow)
2021-09-17 10:53:20 +00:00
![](https://visitor-badge.glitch.me/badge?page_id=userprefix.readme)
Lightweight, efficient, and real-time user prefix system.
This plugin is implemented based on Spigot ,**Theoretically** support ALL MineCraft Versions.
The development of this plugin is based on Chinese which purpose is to help Chinese developers learn Bukkit plugin
development.
2021-10-03 15:53:40 +00:00
> This plugin has been published on [SpigotMC](https://www.spigotmc.org/resources/userprefix.96277/) .
2021-10-03 15:53:40 +00:00
> 本插件已在 [MCBBS](https://www.mcbbs.net/forum.php?mod=viewthread&tid=1261503) 上发布,欢迎中文用户来这里下载。
2021-09-17 10:53:20 +00:00
## Examples
2022-01-07 00:45:46 +00:00
![example](.documentation/images/using-example.png)
2021-09-17 10:53:20 +00:00
## Dependencies
2022-01-07 01:13:05 +00:00
- **[Necessary]** Plugin developed based on [Spigot-API](https://hub.spigotmc.org/stash/projects/SPIGOT)
and [BukkitAPI](http://bukkit.org/).
2021-09-17 10:53:20 +00:00
- **[Necessary]** Plugin data storage base on [LuckPerms](https://www.spigotmc.org/resources/luckperms.28140/).
- **[Recommend]** Placeholders based on [PlaceholderAPI](https://www.spigotmc.org/resources/6245/) .
For development dependencies, please see [Dependencies](https://github.com/CarmJos/UserPrefix/network/dependencies) .
## Features
- **Theoretically** support ALL MineCraft Versions.
- Reloading the configuration will automatically refresh the prefix of all players.
2022-01-07 01:01:36 +00:00
- Real-time judgment and feedback to the player when permissions are changed.
2021-09-17 10:53:20 +00:00
- Configurable sounds and messages.
- The prefix icon can be configured as "Selected", "Has Permission" and “No Permission”.
- Item configuration is natively configured through ItemStack, which supports all MC settings!
- TabList is automatically sorted according to the weight of the prefix (if there is a conflict, it can be turned off)
2022-01-07 01:01:36 +00:00
- The prefix display on the player name (can be turned off if there has any conflict)
- Simple Chat Format Placeholder support. (Not Recommended)
2022-01-07 01:13:05 +00:00
- GUI with automatic sorting and page turning!
2022-01-07 01:01:36 +00:00
- Support PlaceholderAPI variables!
2022-01-07 01:13:05 +00:00
- Support [Hex Color](https://www.hexcolortool.com/)! (Version 1.16 and above) `&(#Color)`
2021-09-17 10:53:20 +00:00
- Example: LightSlateBlue `&(#8470FF)` 、 DarkSlateBlue `&(#483D8B)`
## Notice
### 1. Version support issues
This plugin theoretically supports all versions.
If the icon does not load, the sound cannot be played, etc., please check whether the type of the item and sound in the
configuration file exists in the current version.
2021-09-17 10:53:20 +00:00
Take the SOUND as an example. The sound that the villager said "OK" is "`VILLAGER_YES`" in the lower version, but it
becomes "`ENTITY_VILLAGER_YES`" in the higher version.
2021-09-17 10:53:20 +00:00
### 2. Scoreboard exception problem
The display of the prefix on the head and the sorting of the TabList both use the scoreboard API.
Please turn of the `functions.OnNamePrefix` in the configuration if there is a conflict.
### 3. Item icon configuration problem
Items are read through the ItemStack serialization method provided by Bukkit. For related configuration methods, please
refer to [ItemStack Serialization](https://www.spigotmc.org/wiki/itemstack-serialization/).
2021-09-17 10:53:20 +00:00
## Commands
This plugin's Commands are based on Chinese!
**May support multi-language in the future.**
```text
/UserPrefix or /prefix #Open prefix GUI
/UserPrefixAdmin # View Admin Command Help
/UserPrefixAdmin reload # Reload Config
2022-01-07 01:23:40 +00:00
/UserPrefixAdmin list # List all configured prefixes.
2021-09-17 10:53:20 +00:00
```
## Placeholders (PlaceholderAPI)
After installed the [PlaceholderAPI](https://github.com/PlaceholderAPI/PlaceholderAPI) , you can
type `/papi info UserPrefix` to see all the placeholders.
```text
# %UserPrefix_prefix%
- Get the content of the current prefix
# %UserPrefix_weight%
- Get the weight of the current prefix.
# %UserPrefix_identifier%
- Get the identifier of the current prefix.
# %UserPrefix_name%
- Get the name of the current prefix.
# %UserPrefix_has_<Identifier>%
- Determine whether the player has a certain prefix(true/false)
```
## Configuration files
2022-01-07 01:13:05 +00:00
### Plugin Configuration ([`config.yml`](src/main/resources/en_US/config.yml) .
2021-09-17 11:10:23 +00:00
Notice: The default configuration is based on Chinese. You can find
2022-01-07 01:13:05 +00:00
the [English Version here](src/main/resources/en_US/config.yml).
2022-01-07 01:13:05 +00:00
### Messages Configuration ([`messages.yml`](src/main/resources/en_US/messages.yml))
2022-01-07 01:13:05 +00:00
Please see the [Source File](src/main/resources/en_US/messages.yml) .
2021-12-20 10:52:42 +00:00
2022-01-07 01:13:05 +00:00
### Prefixes Configuration ([`prefixes/*.yml`](src/main/resources/en_US/example-prefix.yml))
All prefixes are separate configuration files, stored in the `<Data Folder>/prefixes/` for easy management.
Some symbols in file name may affect reading, please avoid using them.
2021-09-17 10:53:20 +00:00
## Support and Donation
This project is support by the [YourCraft(你的世界)](https://www.ycraft.cn) .
2022-01-07 00:45:46 +00:00
![TeamLogo](.documentation/images/team-logo.png)
2021-09-17 10:53:20 +00:00
## Open source agreement
The source code of this project uses [GNU General Public License v3.0](https://opensource.org/licenses/GPL-3.0)
License.
2021-09-17 10:53:20 +00:00