Package noppes.npcs.api.item
Interface IItemScripted
- All Superinterfaces:
IItemStack
-
Method Summary
Modifier and TypeMethodDescriptionint
getColor()
int
boolean
double
getTexture
(int damage) Deprecated.will be removed in the futureboolean
hasTexture
(int damage) void
setColor
(int color) void
setDurabilityColor
(int color) void
setDurabilityShow
(boolean bo) void
setDurabilityValue
(float value) void
setMaxStackSize
(int size) void
setTexture
(int damage, String texture) Deprecated.will be removed in the futurevoid
setTexture
(String texture) Methods inherited from interface noppes.npcs.api.item.IItemStack
addEnchantment, compare, copy, damageItem, getAttackDamage, getAttribute, getDamage, getDisplayName, getFoodLevel, getItemName, getItemNbt, getLore, getMaxDamage, getMaxStackSize, getMCItemStack, getName, getNbt, getStackSize, getStoreddata, getTempdata, getType, hasAttribute, hasCustomName, hasEnchant, hasNbt, isBlock, isBook, isDamageable, isEmpty, isEnchanted, isWearable, removeEnchant, removeNbt, setAttribute, setAttribute, setCustomName, setDamage, setLore, setStackSize
-
Method Details
-
hasTexture
boolean hasTexture(int damage) -
getTexture
Deprecated.will be removed in the future -
getTexture
String getTexture() -
setTexture
Deprecated.will be removed in the future -
setTexture
- Parameters:
texture
- Item the scripted item will use as texture
-
setMaxStackSize
void setMaxStackSize(int size) -
getDurabilityValue
double getDurabilityValue()- Returns:
- Returns a value between 0 and 1, 0 is an empty durability bar and 1 a full one
-
setDurabilityValue
void setDurabilityValue(float value) - Parameters:
value
- A value between 0 and 1, 0 is an empty durability bar and 1 a full one
-
getDurabilityShow
boolean getDurabilityShow()- Returns:
- Returns whether the durability is visible or not
-
setDurabilityShow
void setDurabilityShow(boolean bo) - Parameters:
bo
- Set whether the durability is visible
-
getDurabilityColor
int getDurabilityColor()- Returns:
- Returns the customly set durability color for the bar. If no custom value is set it will return -1
-
setDurabilityColor
void setDurabilityColor(int color) - Parameters:
color
- Set a custom color hex value for durability bar.
-
getColor
int getColor()- Returns:
- Returns the color of the item. -1 for no color
-
setColor
void setColor(int color) - Parameters:
color
- Set a custom color hex value for the item tint. -1 to remove the color
-