Package net.jeqo.bloons.balloon.model
Class BalloonModel
java.lang.Object
net.jeqo.bloons.balloon.model.BalloonModel
A class to handle the creation of balloon models with custom model data and color metadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.ItemStack
createBlankModel
(org.bukkit.Material material, int customModelData) Creates a model from any item without a specified colour and with custom model data in the metadatastatic org.bukkit.inventory.ItemStack
createColouredModel
(org.bukkit.Material material, int colourRed, int colourGreen, int colourBlue, int customModelData) Generates a coloured model with the specified color derived from the given RGB valuesstatic org.bukkit.inventory.ItemStack
createColouredModel
(org.bukkit.Material material, org.bukkit.Color colour, int customModelData) Generates a coloured model with the specified colour and custom model data
-
Constructor Details
-
BalloonModel
public BalloonModel()
-
-
Method Details
-
createColouredModel
public static org.bukkit.inventory.ItemStack createColouredModel(org.bukkit.Material material, org.bukkit.Color colour, int customModelData) Generates a coloured model with the specified colour and custom model data- Parameters:
material
- The Material type you want to generate the item as, type org.bukkit.Materialcolour
- The colour to dye the item if able to be dyed, type org.bukkit.ColorcustomModelData
- The custom model data value, type int- Returns:
- The generated item created with the corresponding metadata, type org.bukkit.inventory.ItemStack.
-
createColouredModel
public static org.bukkit.inventory.ItemStack createColouredModel(org.bukkit.Material material, int colourRed, int colourGreen, int colourBlue, int customModelData) Generates a coloured model with the specified color derived from the given RGB values- Parameters:
material
- The Material type you want to generate the item as, type org.bukkit.MaterialcolourRed
- The red colour value in the RGB, within the range of 0-255, type intcolourGreen
- The green colour value in the RGB, within the range of 0-255, type intcolourBlue
- The blue colour value in the RGB, within the range of 0-255, type intcustomModelData
- The custom model data value attached to the item metadata, type int- Returns:
- The generated item created with the corresponding metadata, type org.bukkit.inventory.ItemStack. If the RGB values are not within the valid range of 0-255, or if the provided material is not dyeable, the method will return null.
-
createBlankModel
public static org.bukkit.inventory.ItemStack createBlankModel(org.bukkit.Material material, int customModelData) Creates a model from any item without a specified colour and with custom model data in the metadata- Parameters:
material
- The Material type of the item you want to generate, type org.bukkit.MaterialcustomModelData
- The custom model data value attached to the item metadata, type int- Returns:
- The generated item created with the corresponding metadata, type org.bukkit.inventory.ItemStack.
-