|
1 | 1 | # SimpAPI v4.3.2 |
| 2 | + |
| 3 | +## Table Of Contents: |
| 4 | +**** |
| 5 | +- [Introduction](#introduction) |
| 6 | +- [Installation](#installation) |
| 7 | + - [Maven](#maven) |
| 8 | + - [Gradle](#gradle) |
| 9 | +- [Usage](#usage) |
| 10 | + - [ColorTranslator - Hexadecimal Color Usage](#colortranslator---hexadecimal-color-usage) |
| 11 | + - [Skull Creator](#skull-creator) |
| 12 | + - [Menu Manager](#menu-manager) |
| 13 | + - [Command Manager](#command-manager) |
| 14 | + |
| 15 | +## Introduction |
2 | 16 | **** |
3 | 17 | SimpAPI, finally a good API that can make coding MC Plugins much easier and less painful. |
4 | 18 | This API includes all of my primary utilities like *Menu Manager*, *Command Manager*, *ColorTranslator*, and more. |
@@ -70,6 +84,38 @@ As you can see, all you need to do is provide the color code after an & as you w |
70 | 84 |
|
71 | 85 | There is also a method for TextComponents called translateColorCodesToTextComponent() which works the same. |
72 | 86 |
|
| 87 | +### Skull Creator |
| 88 | +**** |
| 89 | + |
| 90 | +What the skull creator does should be pretty self-explanatory, here are a few tutorials on how to use it. |
| 91 | + |
| 92 | +#### Creating a skull |
| 93 | + |
| 94 | + _**Example**_: 1 |
| 95 | +```java |
| 96 | +ItemStack playerSkull = SkullCreator.itemFromUuid(player.getUniqueId()); |
| 97 | +``` |
| 98 | + |
| 99 | +In the example above, we are using the itemFromUuid, this will take in the player's uuid, which will return an ItemStack |
| 100 | + |
| 101 | + _**Example**_: 2 |
| 102 | +```java |
| 103 | +ItemStack playerSkull = SkullCreator.itemFromUuid(player.getName()); |
| 104 | +``` |
| 105 | + |
| 106 | +Although the example above works, it is not recommended because names are not as accurate as id's. |
| 107 | + |
| 108 | +Keep in mind that when you create a skull, the default name of said skull will be `{Player name}'s Head`. If you would like to change this to be just the players name, without `'s head`, all you have to do is get the item's meta, and change the display name to the player's display name, simple!: |
| 109 | + |
| 110 | +```java |
| 111 | +ItemStack playerSkull = SkullCreator.itemFromUuid(player.getUniqueId()); |
| 112 | +playerSkull.getItemMeta().setDisplayName( |
| 113 | + player.getDisplayName() |
| 114 | + ); |
| 115 | +``` |
| 116 | +##### Note: |
| 117 | + |
| 118 | +The skull creator was not created by Kody Simpson, the creator of the [library](https://github.com/deanveloper/SkullCreator/blob/master/src/main/java/dev/dbassett/skullcreator/SkullCreator.java) is [Dean B](https://github.com/deanveloper) |
73 | 119 |
|
74 | 120 | ### Menu Manager |
75 | 121 | **** |
|
0 commit comments