Class HeadMaterial
java.lang.Object
com.moyskleytech.obsidian.material.ObsidianMaterial
com.moyskleytech.obsidian.material.implementations.HeadMaterial
- All Implemented Interfaces:
Comparable<ObsidianMaterial>
Special implementation allowing heads to be stored as material
-
Constructor Summary
ConstructorsConstructorDescriptionHeadMaterial(String key, String owner) Build a Head material for a specified ownerHeadMaterial(String key, org.bukkit.OfflinePlayer owner) Build a Head material for a specified owner -
Method Summary
Modifier and TypeMethodDescriptionstatic ObsidianMaterialgetMaterial(org.bukkit.inventory.ItemStack itemStack) return the correct ObsidianMaterial for a itemstack of a headgetOwner()org.bukkit.OfflinePlayerstatic booleanValidate that the enchant meta data exists on the version of bukkit usedorg.bukkit.inventory.ItemStacktoItem()Object a ItemStack of the desired materialorg.bukkit.MaterialObtain the bukkit material associated with this materialwith(org.bukkit.OfflinePlayer p)
-
Constructor Details
-
HeadMaterial
Build a Head material for a specified owner- Parameters:
key- The unique keyowner- The owner of the head
-
HeadMaterial
Build a Head material for a specified owner- Parameters:
key- The unique keyowner- The owner of the head
-
-
Method Details
-
with
-
with
-
getOwner
-
getPlayer
public org.bukkit.OfflinePlayer getPlayer() -
isSupported
public static boolean isSupported()Validate that the enchant meta data exists on the version of bukkit used- Returns:
- If Head materials can be used
-
toMaterial
public org.bukkit.Material toMaterial()Description copied from class:ObsidianMaterialObtain the bukkit material associated with this material- Specified by:
toMaterialin classObsidianMaterial- Returns:
- the enum value associated
-
toItem
public org.bukkit.inventory.ItemStack toItem()Description copied from class:ObsidianMaterialObject a ItemStack of the desired material- Specified by:
toItemin classObsidianMaterial- Returns:
- new ItemStack
-
getMaterial
return the correct ObsidianMaterial for a itemstack of a head- Parameters:
itemStack- The item stack to serialize- Returns:
- The correct instance of ObsidianMaterial for the item stack
-