Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DiFFoZ committed Nov 24, 2020
2 parents ba4ed14 + 4be4f44 commit b15e1e3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
asset_name: PermissionExtensions.dll
asset_content_type: application/x-msdownload
- name: Push to NuGet
run: dotnet nuget push Kits/bin/Release/*.nupkg
run: dotnet nuget push PermissionExtensions/bin/Release/*.nupkg
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
--source https://api.nuget.org/v3/index.json
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,57 @@
# PermissionExtensions
# Permission Extensions
Add support prefix, suffix, and color for OpenMod/Unturned!

![Deployment](https://github.com/DiFFoZ/PermissionExtensions/workflows/Deployment/badge.svg)
[![Nuget](https://img.shields.io/nuget/v/DiFFoZ.PermissionExtensions)](https://www.nuget.org/packages/DiFFoZ.PermissionExtensions/)
[![Nuget](https://img.shields.io/nuget/dt/DiFFoZ.PermissionExtensions)](https://www.nuget.org/packages/DiFFoZ.PermissionExtensions/)
[![Discord](https://img.shields.io/discord/764502843906064434?label=Discord%20chat)](https://discord.gg/5MT2yke)

## How install/update plugin
Run command `openmod install DiFFoZ.PermissionExtensions`. After installing reload openmod or restart the server.

# How change prefix/suffix or color
First at all [install a plugin](https://github.com/DiFFoZ/PermissionExtensions#how-installupdate-plugin) then open file `openmod.roles.yaml`. You will see a new data appears in all roles (`color`, `prefix`, and `suffix`).

- **Color:** you can see about it [there](https://github.com/DiFFoZ/PermissionExtensions#all-available-colors). Example:
```yaml
color: Blue
```
- **Prefix:** adds a prefix to the nickname at the start. Example:
```yaml
prefix: "[Police] "
```
- **Suffix:** adds a suffix to the nickname at the end. Example:
```yaml
suffix: " [IV]"
```
Example how will be look `openmod.roles.yaml`:
```yaml
roles:
- id: police
priority: 5
parents:
- default
permissions:
- Kits:kits.vip
displayName:
data:
color: Blue
prefix: "[Police] "
suffix: " [IV]"
isAutoAssigned: false
...
```
**At the end nickname will be `[Police] %PlayerName% [IV]`**.

# All available colors
![Colors](https://docs.microsoft.com/en-us/dotnet/media/art-color-table.png?view=netcore-3.1)

Also, you can use hex colors. Just set the color to e.g.
```yaml
color: "#2ed264"
```

You can read more detailed about it in [docs](https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.colors?view=netcore-3.1).

# This plugin is so hard to understand
You can get support in my discord server [![Discord](https://img.shields.io/discord/764502843906064434?label=Discord%20chat)](https://discord.gg/5MT2yke) or in [OpenMod discord](https://discord.gg/M7sY8cc).

0 comments on commit b15e1e3

Please sign in to comment.