Class ItemRegistration.ItemDefinitionBuilder
java.lang.Object
ke.ric.api.registration.ItemRegistration.ItemDefinitionBuilder
- Enclosing class:
ItemRegistration
Builder for creating custom item definitions.
-
Method Summary
Modifier and TypeMethodDescriptionaddEffect(org.bukkit.potion.PotionEffectType effectType, int durationTicks, int amplifier) Add a guaranteed potion effect (100% chance).addEffect(org.bukkit.potion.PotionEffectType effectType, int durationTicks, int amplifier, float probability) Add a potion effect when this item is consumed.Mark this item as owned by an addon.baseMaterial(org.bukkit.Material material) build()Build the item definition.canAlwaysEat(boolean canAlwaysEat) color(org.bukkit.Color color) consumeSeconds(float seconds) edible(boolean edible) feast(boolean feast) foodValue(int foodValue) particleBlock(org.bukkit.Material particleBlock) Set the block material used for eating particles.placeable(boolean placeable) Allow this item to be placed as a block (generic).placeableServings(int servings) Make this food placeable as a block and consumable in servings (cake-like).saturation(float saturation) Add reusable normalized ingredient tags to this custom item.Set the logical visual ID for this item.
-
Method Details
-
id
-
name
-
baseMaterial
-
texture
-
edible
-
foodValue
-
saturation
-
consumeSeconds
-
canAlwaysEat
-
animation
-
addEffect
public ItemRegistration.ItemDefinitionBuilder addEffect(org.bukkit.potion.PotionEffectType effectType, int durationTicks, int amplifier, float probability) Add a potion effect when this item is consumed.- Parameters:
effectType- The potion effect typedurationTicks- Duration in ticks (20 ticks = 1 second)amplifier- Effect amplifier (0 = level I, 1 = level II, etc.)probability- Chance to apply (0.0-1.0)
-
addEffect
public ItemRegistration.ItemDefinitionBuilder addEffect(org.bukkit.potion.PotionEffectType effectType, int durationTicks, int amplifier) Add a guaranteed potion effect (100% chance). -
particleBlock
Set the block material used for eating particles. If not set, falls back to default particle colors. -
placeableServings
Make this food placeable as a block and consumable in servings (cake-like). Only PLAYER_HEAD-based foods are supported for placeable servings.- Parameters:
servings- Number of servings (0 to disable)
-
placeable
Allow this item to be placed as a block (generic). -
feast
-
color
-
visualId
Set the logical visual ID for this item. Visual providers resolve it using their own conventions. -
addonId
Mark this item as owned by an addon. The item remains unavailable when the addon is not registered. -
tags
Add reusable normalized ingredient tags to this custom item. -
build
Build the item definition.
-