Skip to content

File objects

srnyx edited this page Jun 2, 2024 · 19 revisions

Bold keys are REQUIRED, everything else is optional!

Table of contents

Sound

Examples

sound: # SOUND (this is just the parent node, it won't always be 'sound')
  sound: ENTITY_GENERIC_EXPLODE # https://srnyx.com/docs/spigot/org/bukkit/Sound.html
  volume: 0.5
  pitch: 1.5
  category: BLOCKS # https://srnyx.com/docs/spigot/org/bukkit/SoundCategory.html
sound: # SOUND (this is just the parent node, it won't always be 'sound')
  sound: ENTITY_EXPERIENCE_ORB_PICKUP # https://srnyx.com/docs/spigot/org/bukkit/Sound.html

Potion effect

  • type: The type of the potion effect https://srnyx.com/docs/spigot/org/bukkit/potion/PotionEffectType.html
  • duration: How long the effect will last for (in ticks)
  • amplifier: The level of the effect, 0 being 1 in-game (defaults to 0)
  • ambient: Makes potion effect produce more, translucent, particles (defaults to true)
  • particles: Whether this effect has particles (defaults to true)
  • icon (1.13+): Whether this effect has an icon (defaults to true)

Examples

potion-effect: # POTION EFFECT (this is just the parent node, it won't always be 'potion-effect')
  type: SPEED # https://srnyx.com/docs/spigot/org/bukkit/potion/PotionEffectType.html
  duration: 300 # 15 seconds
  amplifier: 4 # Level 5 in-game
  ambient: false
  particles: false
  icon: false
potion-effect: # POTION EFFECT (this is just the parent node, it won't always be 'potion-effect')
  type: SPEED # https://srnyx.com/docs/spigot/org/bukkit/potion/PotionEffectType.html
  duration: 300 # 15 seconds

Attribute modifier

This is only available for 1.9 and higher!

The attribute the modifier will affect is not included here, as it is usually the name of the key like in Item stacks

Examples

attribute-modifier: # ATTRIBUTE MODIFIER (this is just the parent node, it won't always be 'attribute-modifier')
  name: health_boost
  operation: ADD_NUMBER # https://srnyx.com/docs/spigot/org/bukkit/attribute/AttributeModifier.Operation.html
  amount: 5
  slot: HEAD # 1.13.2+, https://srnyx.com/docs/spigot/org/bukkit/inventory/EquipmentSlot.html
attribute-modifier: # ATTRIBUTE MODIFIER (this is just the parent node, it won't always be 'attribute-modifier')
  name: health_boost
  operation: MULTIPLY_SCALAR_1 # https://srnyx.com/docs/spigot/org/bukkit/attribute/AttributeModifier.Operation.html

Item stacks

Examples

item: # ITEM STACK (this is just the parent node, it won't always be 'item')
  material: DIAMOND_PICKAXE # https://srnyx.com/docs/spigot/org/bukkit/Material.html
  count: 1
  damage: 561 # Since Diamond Pickaxes have 1,561 durability, the new durability will be 1,000
  name: "&c&lGOD PICKAXE"
  lore:
    - "&7The most epic pickaxe in the game!"
    - "&7&oMake sure not to drop it..."
  enchantments: # https://srnyx.com/docs/spigot/org/bukkit/enchantments/Enchantment.html
    DIG_SPEED: 5 # Efficiency 5
    LOOT_BONUS_MOBS: 2 # Looting 2
  flags: # https://srnyx.com/docs/spigot/org/bukkit/inventory/ItemFlag.html
    - HIDE_UNBREAKABLE
    - HIDE_ENCHANTS
  data:
    owner: srnyx
    instakill: true
    points: 5
  unbreakable: true # 1.11+
  attribute-modifiers: # 1.13.2+, https://srnyx.com/docs/spigot/org/bukkit/attribute/Attribute.html
    GENERIC_ATTACK_DAMAGE:
      name: attack_boost
      operation: ADD_NUMBER
      amount: 20
    GENERIC_MAX_HEALTH:
      name: health_boost
      operation: ADD_SCALAR
      amount: 5
  custom-model-data: 4508 # 1.14+
item: # ITEM STACK (this is just the parent node, it won't always be 'item')
  material: APPLE # https://srnyx.com/docs/spigot/org/bukkit/Material.html
  count: 32

Recipes

  • ingredients: The character aliases and their corresponding materials (key is the character, value is the material) https://srnyx.com/docs/spigot/org/bukkit/Material.html
  • shape: The shape the recipe should take, or, if shapeless, it will be used to get the amount of each ingredient. This should use the characters listed in ingredients and only be 3 rows
  • result: The end result of the recipe (see Item stacks above for more info)
    • This may not always be required, depending on what the recipe is for and what the plugin is doing
  • shapeless: Whether the recipe requires a specific shape (defaults to false)

Example

recipe: # RECIPE (this is just the parent node, it won't always be 'recipe')
  ingredients: # https://srnyx.com/docs/spigot/org/bukkit/Material.html
    A: APPLE
    G: GOLD_BLOCK
  shape:
    - "GGG"
    - "GAG"
    - "GGG"
  shapeless: false
  result:
    material: ENCHANTED_GOLDEN_APPLE