Skip to content

XItemStack

Crypto Morin edited this page Jul 6, 2023 · 5 revisions
name: Text # The name of the item.
lore: Text or [Text] # The lore of the item. You can use this differently. A single text for a single line of lore or
                     # a list of text (optionally also separated by newline \n characters) for multiple lines.
material: Text # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
amount: Number # The item amount.
damage: Decimal # The item's damage (durability).

skull: Text
"Text The item's skull texture This can be a player's name, UUID, a "textures.minecraft.com" link or a Base64."  \
"The recommended value is always Base64 as it doesn't require encoding and connections."                         \
"A good website to get skull textures from that also supports Base64 is "minecraft-heads.com/custom-heads""       \
"The value preference for this option from best to worst is as follows: #{Base64 then URL then UUID then Name}"  \
"Note that you need to set the material to "PLAYER_HEAD" for this to work."

unbreakable: Boolean # Whether this item should have an unbreakable attribute.
custom-model-data: Number # The 1.14 custom data models feature.

enchants: [Enchant]
class Enchant
  EnchantmentName: Number # The level of the enchantment.
end

# Example:
enchants:
  ARROW_FIRE: 2
  DURABILITY: 3

# Stored enchantment in the book are different than the enchantments applied to the item itself.
when { material: ENCHANTED_BOOK } then stored-enchants: [Enchant]

flags: Flag or [Flag] # Item flags in Minecraft are badly named, so it might not do the exact thing you're looking for.
                      # In this case, you might want to try other flags. 
alias Flag: for Text
  ALL              # Includes all these flags.
  HIDE_ATTRIBUTES  # Setting to show/hide attributes. (Read further for attributes)
  HIDE_DESTROYS    # Setting to show/hide what the item can break/destroy.
  HIDE_DYE         # Setting to show/hide dyes from colored leather armor.
  HIDE_ENCHANTS    # Setting to show/hide enchants.
  HIDE_PLACED_ON   # Setting to show/hide where this item can be build/placed on.
  HIDE_UNBREAKABLE # Setting to show/hide the unbreakable state. (This is not the same as unbreaking enchant)
  HIDE_POTION_EFFECTS # Setting to show/hide potion effects, book and firework information, map tooltips, and enchantments of enchanted books.
alias end

# E.g.
flags: [HIDE_ATTRIBUTES, HIDE_POTION_EFFECTS]

# Purely for a glowing visual glowing effect. This adds unbreaking I enchantment
# and hides the enchantment with HIDE_ENCHANTS flag automatically.
glow: Bool

attributes: [Attribute] # Item attributes are the numbers shown in the bottom of the item's description under the item's lore. You can hide these with item flags but you can also change them with attributes.\

class Attribute
  AttributeName: Text # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html
    name: Text # https://minecraft.gamepedia.com/Attribute
    amount: Decimal # The modifier's number.
    operation: Text # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/AttributeModifier.Operation.html
    slot: Slot # The attribute will only take effect if this item is placed in this particular slot.
end

alias Slot: for Text    HEAD or CHEST or LEGS or FEET or HAND or OFF_HAND

case
when { material: any BANNER } then patterns: [Pattern] # As the key and DyeColor as the value.

when { material: any LEATHER_ARMOR or any POTION } then color: Color

when { material: AXOLOTL_BUCKET } then color: LUCY or WILD or GOLD or CYAN or BLUE
when { material: TROPICAL_FISH_BUCKET } then color: DyeColor and pattern-color: DyeColor and pattern: TropicalFishPattern

when { material: any SHULKER_BOX } then contents: [Item]
when { material: SPAWNER } then spawner: Text # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html

when { material: CROSSBOW } then projectiles: [Item] # A list of items for charged projectiles of a crossbow.
when { material: SUSPICIOUS_STEW } then effects: [Potion]
when { material: WRITTEN_BOOK } then 
  author: Text
  title: Text
  pages: [Text]
  generation: ORIGINAL or COPY_OF_ORIGINAL or COPY_OF_COPY or TATTERED
}

when { material: FILLED_MAP } then
  scaling: Bool
  location: Location
  color: Color
}

# Only used for old versions.
when { material: SPAWN_EGG } then creature: EntityType

when { material: COMPASS and version > 15 } then
  tracked: Bool # Whether this compass is tracking a lodestone.
  lodestone: Location # The location of lodestone being tracked.
}

when { material: FIREWORK } then
  power: Decimal # The power of a firework.
  firework:
    flicker: Boolean # Firework should flicker
    trial: Boolean # Firework should have trial.
    colors: [Color]
    fade-colors: [Color]
    type: Text # The firework https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/FireworkEffect.Type.html
end

class Location
  world: Text
  x: Decimal
  y: Decimal
  z: Decimal
end

alias Color: for Text "red, green, blue" or "hex color"

alias DyeColor: for Text WHITE or ORANGE or MAGENTA or LIGHT_BLUE or YELLOW or LIME or PINK or GRAY or
                         LIGHT_GRAY or CYAN or PURPLE or BLUE or BROWN or GREEN or RED or BLACK

alias TropicalFishPattern: for Text KOB or SUNSTREAK or SNOOPER or DASHER or BRINELY or SPOTTY or 
                                   FLOPPER or STRIPEY or GLITTER or BLOCKFISH or BETTY or CLAYFISH

Out of all these values, only the material option is required.

Clone this wiki locally