Skip to content

Commit f8f4482

Browse files
committed
Added documentation for cosmetic disabling
1 parent 133468b commit f8f4482

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

examples.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Below are some examples of how you could hook into our mods using this API.
88
* [Notifications](https://github.com/BadlionClient/BadlionClientModAPI/blob/master/examples.md#notifications)
99
* [Click Event Types](https://github.com/BadlionClient/BadlionClientModAPI/blob/master/examples.md#click-event-types)
1010
* [Levels](https://github.com/BadlionClient/BadlionClientModAPI/blob/master/examples.md#levels)
11-
11+
* [Cosmetics](https://github.com/BadlionClient/BadlionClientModAPI/blob/master/examples.md#cosmetics)
1212

1313
## Waypoints
1414

@@ -196,4 +196,25 @@ There are three different click event types you can use for buttons.
196196
There are different notification levels to choose from.
197197
* `INFO` a simple notification with a blue info texture.
198198
* `ERROR`/`WARNING` shows that something went wrong.
199-
* `SUCCESS` shows that something went successful with a green checkmark.
199+
* `SUCCESS` shows that something went successful with a green checkmark.
200+
201+
## Cosmetics
202+
203+
You can disable cosmetics using our API. For now we only allow nametag cosmetics to be toggled.
204+
It could be used in a /nick implementation for example.
205+
206+
```java
207+
public class NickManager {
208+
public void addUserNick(Player player) {
209+
// ... Your own code
210+
211+
Cosmetics.disableNametagCosmetics(player.getUniqueId());
212+
}
213+
214+
public void removeUserNick(Player player) {
215+
// ... Your own code
216+
217+
Cosmetics.enableNametagCosmetics(player.getUniqueId());
218+
}
219+
}
220+
```

0 commit comments

Comments
 (0)