Class BalloonModel

java.lang.Object
net.jeqo.bloons.balloon.model.BalloonModel

public class BalloonModel extends Object
A class to handle the creation of balloon models with custom model data and color metadata
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.Material
      colour - The colour to dye the item if able to be dyed, type org.bukkit.Color
      customModelData - 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.Material
      colourRed - The red colour value in the RGB, within the range of 0-255, type int
      colourGreen - The green colour value in the RGB, within the range of 0-255, type int
      colourBlue - The blue colour value in the RGB, within the range of 0-255, type int
      customModelData - 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.Material
      customModelData - 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.