Fork of SkullCreator with extra stuff
The only difference is that it is written in Kotlin, and allows you to get
head from name or UUID online (using MojangAPI)
Maven
<dependency>
<groupId>eu.xap3y</groupId>
<artifactId>skullcreator</artifactId>
<version>1.0</version>
</dependency>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>eu.xap3y.skullcreator</pattern>
<!-- Replace your.package with your real package -->
<shadedPattern>your.package.skullcreator</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Gradle (Groovy)
repositories {
mavenCentral()
}
dependencies {
implementation 'eu.xap3y:skullcreator:1.0'
}
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
tasks {
shadowJar {
// Dont forget to replace 'your.package' with your package
relocate 'eu.xap3y.skullcreator', "your.package.skullcreator"
}
}
Gradle (Kotlin DSL)
repositories {
mavenCentral()
}
dependencies {
implementation("eu.xap3y:skullcreator:1.0")
}
plugins {
id("com.github.johnrengelman.shadow") version ("8.1.1")
}
tasks {
shadowJar {
relocate("eu.xap3y.skullcreator", "your.package.skullcreator")
}
}
Note
Same as the original SkullCreator only except the new stuff below
You can look at some examples here
Docs are available at skullcreator.xap3y.eu
SkullCreator.itemFromNameOnline("XAP3Y")
returning CompletableFuture<ItemStack>
SkullCreator.itemFromNameOnline("XAP3Y").whenComplete { item, _ ->
player.inventory.addItem(item)
}
The argument has to be UUID in string. It doesn't matter if you put the UUID with dashed or not
SkullCreator.itemFromUuidOnline("f1c3931e93d341258fdc9b1dc39bc4d6")
which also returns CompletableFuture<ItemStack>
SkullCreator.itemFromUuidOnline("f1c3931e93d341258fdc9b1dc39bc4d6").whenComplete { item, _ ->
player.inventory.addItem(item)
}