Class SkriptMaterial
java.lang.Object
com.moyskleytech.obsidian.material.ObsidianMaterial
com.moyskleytech.obsidian.material.implementations.SkriptMaterial
- All Implemented Interfaces:
Comparable<ObsidianMaterial>
Special implementation of ObsidianMaterial for Skript
-
Constructor Summary
ConstructorsConstructorDescriptionSkriptMaterial(ch.njol.skript.aliases.ItemType effects, String key) Create a book material from a list of enchant with associated level -
Method Summary
Modifier and TypeMethodDescriptionbooleanisSimilar(org.bukkit.inventory.ItemStack item) Compare this value with a ItemStack for similaritiesstatic 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 material
-
Constructor Details
-
SkriptMaterial
Create a book material from a list of enchant with associated level- Parameters:
effects- Enchants and levelkey- The string representing the material
-
-
Method Details
-
isSupported
public static boolean isSupported()Validate that the enchant meta data exists on the version of bukkit used- Returns:
- If Book 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
-
isSimilar
public boolean isSimilar(org.bukkit.inventory.ItemStack item) Description copied from class:ObsidianMaterialCompare this value with a ItemStack for similarities- Overrides:
isSimilarin classObsidianMaterial- Parameters:
item- The item to compare- Returns:
- If the itemstack is similar
-