mirror of
https://github.com/IHasName/CustomHeads.git
synced 2025-02-27 21:01:19 +01:00
Updated API (markdown)
parent
bf38b6306d
commit
e3a214052b
57
API.md
57
API.md
@ -1 +1,56 @@
|
|||||||
Will be updated with the next update
|
This API contains CustomHead and CustomHeadsAPI
|
||||||
|
|
||||||
|
|
||||||
|
## CustomHeadsAPI
|
||||||
|
|
||||||
|
### setSkullWithTexture(Block block, String texture, BlockFace facing)
|
||||||
|
|
||||||
|
Sets an Skull at the Location with the Texture on it
|
||||||
|
Rotation can be set with `facing`
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### getAlphabetHead(String input, CSkullType type)
|
||||||
|
|
||||||
|
Returns an Texture Head with an Character or Number on it
|
||||||
|
SkullType can be: WOOD, STONE
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### writeText(String text, Location location, CSkullType type)
|
||||||
|
|
||||||
|
Writes an Text like /heads write from left to right.
|
||||||
|
Rotation of the Text is determined by the Yaw of the Location
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
### getSkullTexture(ItemStack itemStack)
|
||||||
|
### getSkullTexture(Block block)
|
||||||
|
|
||||||
|
Returns an Base64 String as Texture Value from an ItemStack/Block
|
||||||
|
|
||||||
|
## CustomHead
|
||||||
|
|
||||||
|
This Builder can be used to create an CustomHead from an URL (only works with textures.minecraft.net!)
|
||||||
|
You can change Display Name with `setDisplayName()` and change the Lore with `setLore()`
|
||||||
|
Supports Colors of course =)
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
CustomHead head = new CustomHead("http://textures.minecraft.net/texture/f7ba92d3aedab25bf544548cc17b3f574c3c80444e374dc9897ccf55fb78b315");
|
||||||
|
|
||||||
|
head.setDisplayName("&6Custom Head");
|
||||||
|
head.addLore("&aThis is a Lore!");
|
||||||
|
|
||||||
|
ItemStack head = head.toItem();
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
You can also just convert the URL to an Texture Value with `getTextureValue()`
|
||||||
|
|
||||||
|
String texturevalue = new CustomHead("http://textures.minecraft.net/texture/f7ba92d3aedab25bf544548cc17b3f574c3c80444e374dc9897ccf55fb78b315").getTextureValue();
|
||||||
|
|
||||||
|
The Last Thing you can do is set the Skull down (see [setSkullWithTexture()](/MrSteinMC/CustomHeads/wiki/API#setskullwithtextureblock-block-string-texture-blockface-facing))
|
||||||
|
You can do this with setAt(Location location, BlockFace facing)
|
||||||
|
Loading…
Reference in New Issue
Block a user