Interface IItemCustomizable

    • Method Detail

      • getScriptHandler

        Object getScriptHandler()
      • getMaxStackSize

        int getMaxStackSize()
        Specified by:
        getMaxStackSize in interface IItemStack
        Returns:
        Returns the maximum stack size for this item.
      • getArmorType

        int getArmorType()
        Gets the armor type for the scripted item.
        Returns:
        The armor type
      • isTool

        boolean isTool()
        Checks if the scripted item is a tool. Allows for enchanting
        Returns:
        True if the item is a tool, false otherwise
      • isNormalItem

        boolean isNormalItem()
        Checks if the scripted item is a normal item.
        Returns:
        True if the item is a normal item, false otherwise
      • getDigSpeed

        int getDigSpeed()
        Gets the dig speed for the scripted item.
        Returns:
        The dig speed
      • getDurabilityValue

        double getDurabilityValue()
        Gets the current durability value for the scripted item.
        Returns:
        The durability value
      • getMaxItemUseDuration

        int getMaxItemUseDuration()
        Gets the maximum item use duration for the scripted item.
        Returns:
        The maximum item use duration
      • getItemUseAction

        int getItemUseAction()
        Gets the item use action for the scripted item.
        Returns:
        The item use action
      • getEnchantability

        int getEnchantability()
        Gets the enchantability for the scripted item.
        Returns:
        The enchantability
      • getAttackSpeed

        int getAttackSpeed()
        Gets the attack speed for the scripted item. Speed is the max hurt resistant time in ticks (20 ticks = 1 second)
        Returns:
        The attack speed
      • getTexture

        String getTexture()
        Gets the texture path for the scripted item.
        Returns:
        The texture path
      • setTexture

        void setTexture​(String texture)
        Sets the texture path for the scripted item. Can be a URL
        Parameters:
        texture - The texture path
      • getDurabilityShow

        Boolean getDurabilityShow()
        Checks if the durability bar should be shown for the scripted item.
        Returns:
        True if the durability bar should be shown, false otherwise
      • setDurabilityShow

        void setDurabilityShow​(Boolean durabilityShow)
        Sets whether the durability bar should be shown for the scripted item.
        Parameters:
        durabilityShow - True if the durability bar should be shown, false otherwise
      • getDurabilityColor

        Integer getDurabilityColor()
        Gets the color of the durability bar for the scripted item.
        Returns:
        The durability bar color
      • setDurabilityColor

        void setDurabilityColor​(Integer durabilityColor)
        Sets the color of the durability bar for the scripted item.
        Parameters:
        durabilityColor - The durability bar color
      • getColor

        Integer getColor()
        Gets the color of the scripted item.
        Returns:
        The item color
      • setColor

        void setColor​(Integer color)
        Sets the color of the scripted item.
        Parameters:
        color - The item color
      • setRotation

        void setRotation​(Float rotationX,
                         Float rotationY,
                         Float rotationZ)
        Sets the rotation values for the scripted item.
        Parameters:
        rotationX - The X-axis rotation
        rotationY - The Y-axis rotation
        rotationZ - The Z-axis rotation
      • setRotationRate

        void setRotationRate​(Float rotationXRate,
                             Float rotationYRate,
                             Float rotationZRate)
        Sets the rotation rate values for the scripted item. Spinning Speed
        Parameters:
        rotationXRate - The X-axis rotation rate
        rotationYRate - The Y-axis rotation rate
        rotationZRate - The Z-axis rotation rate
      • setScale

        void setScale​(Float scaleX,
                      Float scaleY,
                      Float scaleZ)
        Sets the scale values for the scripted item.
        Parameters:
        scaleX - The X-axis scale
        scaleY - The Y-axis scale
        scaleZ - The Z-axis scale
      • setTranslate

        void setTranslate​(Float translateX,
                          Float translateY,
                          Float translateZ)
        Sets the translation values for the scripted item.
        Parameters:
        translateX - The X-axis translation
        translateY - The Y-axis translation
        translateZ - The Z-axis translation
      • getRotationX

        Float getRotationX()
        Gets the X-axis rotation for the scripted item.
        Returns:
        The X-axis rotation
      • getRotationY

        Float getRotationY()
        Gets the Y-axis rotation for the scripted item.
        Returns:
        The Y-axis rotation
      • getRotationZ

        Float getRotationZ()
        Gets the Z-axis rotation for the scripted item.
        Returns:
        The Z-axis rotation
      • getRotationXRate

        Float getRotationXRate()
        Gets the X-axis rotation rate for the scripted item.
        Returns:
        The X-axis rotation rate
      • getRotationYRate

        Float getRotationYRate()
        Gets the Y-axis rotation rate for the scripted item.
        Returns:
        The Y-axis rotation rate
      • getRotationZRate

        Float getRotationZRate()
        Gets the Z-axis rotation rate for the scripted item.
        Returns:
        The Z-axis rotation rate
      • getScaleX

        Float getScaleX()
        Gets the X-axis scale for the scripted item.
        Returns:
        The X-axis scale
      • getScaleY

        Float getScaleY()
        Gets the Y-axis scale for the scripted item.
        Returns:
        The Y-axis scale
      • getScaleZ

        Float getScaleZ()
        Gets the Z-axis scale for the scripted item.
        Returns:
        The Z-axis scale
      • getTranslateX

        Float getTranslateX()
        Gets the X-axis translation for the scripted item.
        Returns:
        The X-axis translation
      • getTranslateY

        Float getTranslateY()
        Gets the Y-axis translation for the scripted item.
        Returns:
        The Y-axis translation
      • getTranslateZ

        Float getTranslateZ()
        Gets the Z-axis translation for the scripted item.
        Returns:
        The Z-axis translation
      • isTextureAnimated

        Boolean isTextureAnimated()
        Returns whether the item texture has animation enabled.
        Returns:
        True if the texture is animated, false otherwise
      • setTextureAnimated

        void setTextureAnimated​(Boolean animated)
        Sets whether the item texture should be animated.
        Parameters:
        animated - True to enable animation
      • getFrameCount

        Integer getFrameCount()
        Gets the number of animation frames in the texture strip.
        Returns:
        The frame count
      • setFrameCount

        void setFrameCount​(Integer frameCount)
        Sets the number of animation frames.
        Parameters:
        frameCount - The frame count
      • getFrameTime

        Integer getFrameTime()
        Gets the ticks per animation frame.
        Returns:
        The frame time in ticks
      • setFrameTime

        void setFrameTime​(Integer frametime)
        Sets the ticks per animation frame.
        Parameters:
        frametime - The frame time in ticks