VaultSpell - 3clipseS/ZanAddons GitHub Wiki

Source Code

spell-class: "com.zanaddon.instant.VaultSpell"

Description:

Vault spell allows players to open up personal vaults and store items. Vault spells creates a folder within the main directory of MagicSpells called vaults. Inside, it creates sub folders for each player's uuid when they cast the spell. Each sub folder contains a .bin file containing the data of each vault.


Option Description Type Default Supports expressions
vault-size Size of the vault Can either be SIZE_9, SIZE_18, SIZE_27, SIZE_36, SIZE_45, SIZE_54 SIZE_9 false
title Display name of the vault String "Window Title " + spellName" true
override-items Replaces existing items in the vault with defined formatted items. See below for formatting String List false
vault-id Custom name for the. Players opening a vault with the same vault-id will open the same vault String null true

Item Formatting:

  • Each item in the list follows this format: magicItem [slot] quantitymin[-quantitymax] [chance%]
  • magicItem follows the Magic Item format.
  • slot defines what slot to place the item in. Use -1 for a random slot
  • You can also conjure scrolls and tomes using this format:
    • SCROLL:<scroll_spell_name>:<spell_name_to_put_on_scroll>:<uses>
    • TOME:<tome_spell_name>:<spell_name_to_put_on_tome>:<uses>
  • A few examples:
    • 331 -1 5-7 - Five to seven redstone dust will drop.
    • 265 4 1-2 10% - There is a 10% chance for 1-2 iron bars to drop in slot 4.
    • 351:4 -1 1 10% - There is a 10% chance for 1 lapis to drop in a radom slot.
    • SCROLL:scroll:blink:5 - A scroll with five charges of blink will drop.
    • TOME:tome:leap:1 - A tome that teaches the leap spell will drop.
⚠️ **GitHub.com Fallback** ⚠️