Skip to content

Commit 16a4fa8

Browse files
committed
Revert "Revert "Added skull creator section in readme.md.""
This reverts commit 5227bd5.
1 parent 5227bd5 commit 16a4fa8

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,38 @@ As you can see, all you need to do is provide the color code after an & as you w
7070

7171
There is also a method for TextComponents called translateColorCodesToTextComponent() which works the same.
7272

73+
### Skull Creator
74+
****
75+
76+
What the skull creator does should be pretty self-explanatory, here are a few tutorials on how to use it.
77+
78+
#### Creating a skull
79+
80+
_**Example**_: 1
81+
```java
82+
ItemStack playerSkull = SkullCreator.itemFromUuid(player.getUniqueId());
83+
```
84+
85+
In the example above, we are using the itemFromUuid, this will take in the player's uuid, which will return an ItemStack
86+
87+
_**Example**_: 2
88+
```java
89+
ItemStack playerSkull = SkullCreator.itemFromUuid(player.getName());
90+
```
91+
92+
Although the example above works, it is not recommended because names are not as accurate as id's.
93+
94+
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!:
95+
96+
```java
97+
ItemStack playerSkull = SkullCreator.itemFromUuid(player.getUniqueId());
98+
playerSkull.getItemMeta().setDisplayName(
99+
player.getDisplayName()
100+
);
101+
```
102+
##### Note:
103+
104+
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)
73105

74106
### Menu Manager
75107
****

0 commit comments

Comments
 (0)