Plugin Help [MagicSpells] : Predefined Items & New Spell

Discussion in 'Plugin Help/Development/Requests' started by Kakemo, Nov 3, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Kakemo

    Bukkit Version : 1.8.3-R0.1-SNAPSHOT
    MagicSpells Version : 3.3-release
    Hi, I was wondering if you guys could help me out with some issues I'm encountering by now...
    The thing is, I wanted to set specific wands to specific levels. I saw in the mana.yml that we could set different ranks to players so I wanted to use that. So I thought that I could at the begining set 5 different ranks. Then use the predefined-items function to set different wands for each rank.

    So, I created 5 ranks (I'm french so the names are in french, but this isn't important) :
    Code:
    apprenti (=novice)
    sorcier (=sorcerer)
    mage (=magus)
    wizard_blanc (=white wizard)
    wizard_noir (=black wizard)

    I created 4 wands using predefined-items in both spells-regular.yml and spells-command.yml files (yes, those are monster eggs blocks, but I use a texture pack to change those into wands :p) :
    Code:
    wandlvl1:
        type: "97:0"
        name: "&6Wizard Wand &8[&cLvL:&l1&8]"
    wandlvl2:
        type: "97:1"
        name: "&bWizard Wand &8[&cLvL:&l2&8]"
    wandblanc:
        type: "97:2"
        name: "†Wizard Wand&r† &8[&f&lMage Blanc&8]"
    wandnoir:
        type: "97:3"
        name: "†Wizard Wand&r† &8[&0&lMage Noir&8]"

    I also created two hats (which will be hat thanks to the texture pack) :
    Code:
    # this is a hat for the rank "wizard_blanc"
    hatblanc:
        type: "97:4"
        name: "&fChapeau"
    
    # this one is for the "wizard_noir" rank
    capnoir:
        type: "97:5"
        name: "&0Capuche"

    To get those, I created a spell in the spells-regular.yml file using the "instant.ConjureSpell" variable called "wizard" :
    Code:
    wizard:
        spell-class: ".instant.ConjureSpell"
        name: wizard
        cast-item: book
        cooldown: 600
        items:
            - wandlvl1 1
            - wandlvl2 1
            - wandblanc 1
            - wandnoir 1
            - capnoir 1
            - hatblanc 1
        add-to-inventory: true

    So, I don't know where my mistake is, but in the console, this appears :
    Code:
    Server thread/WARN]: [MagicSpells] Error loading config file spells-command.yml
    [Server thread/WARN]: org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
    in 'string', line 2, column 5:
    wandlvl1:
    ^
    expected <block end>, but found BlockMappingStart
    in 'string', line 8, column 6:
    wandlvl2:
    ^
    *the rest of the error here*
    
    [Server thread/WARN]: [MagicSpells] Error loading config file spells-regular.yml
    [Server thread/WARN]: org.bukkit.configuration.InvalidConfigurationException: while parsing a block mapping
    in 'string', line 2, column 5:
    wandlvl1:
    ^
    expected <block end>, but found BlockMappingStart
    in 'string', line 8, column 6:
    wandlvl2:
    ^
    *the rest of the error here*
    [Server thread/INFO]: [MagicSpells] Spells loaded: 0
    [Server thread/WARN]: [MagicSpells] No spells loaded!

    I don't know if you need the *the rest of the error here* section, so I uploaded it so it won't urt your eyes reading my thread :)
    I also uploaded my general.yml, mana.yml, spells-command.yml and spells-regular.yml so you can fully understand my problem.
    Thanks in advance, and bye !
     

    Attached Files:

  2. Offline

    Kakemo

    Anyone ?...
     
  3. Offline

    MaHl111

    Your problem is in String... How it said, it can't read your definition for wands:
    It said: "I can't read it because I can't define 'string' value on line 2, column5 and line 8, column 6. When I don't see full script, I can't tell you what's going on in here.
     
Thread Status:
Not open for further replies.

Share This Page