Solved CratesPlus Help

Discussion in 'Spigot Plugin Help' started by LexKitty_CC, Nov 15, 2017.

  1. Having a few issues with crates plus.
    Some items are supposed to be enchanted with infinity and looting respectively. However, it throws this error when the server starts up and doesn't give the enchantment on the items.
    [Server] WARN Invalid enchantment "INFINITY" found for item "[Alpha Bow]"
    [Server] WARN Invalid enchantment "LOOTING" found for item "[Alpha Sword]"
    Code (Text):
          '3':
            Type: ITEM
            Item Type: DIAMOND_SWORD
            Item Data: 6
            Percentage: 5
            Name: '&4[&cAlpha Sword&4]'
            Amount: 1
            Enchantments:
            - SHARPNESS-3
            - UNBREAKING-2
            - LOOTING-1

          '5':
            Type: ITEM
            Item Type: BOW
            Name: '&4[&cAlpha Bow&4]'
            Item Data: 0
            Percentage: 10
            Amount: 1
            Enchantments:
            - UNBREAKING-2
            - POWER-2
            - INFINITY-1
    Second issue is it seems like the third item in the crates if it's a tool or armor shows up damaged. I tested this and when you receive the item as a prize, it is damaged. Not sure what's causing this.
    Also not sure if it can be fixed or not since it's not hurting anything, but the enchantments on some items aren't showing up in the previews.
    [​IMG]
    [​IMG]

    Here's my full config I'm running right now if it helps.
    Code (Text):
    # [][][][][][][][][][][][][][][][][][][][][]
    #  CratesPlus V4.4.4 Config
    # [][][][][][][][][][][][][][][][][][][][][]
    # ------------------------------------------
    # There are many placeholders that can now be used withing the config and messages file, placeholders are as followed:
    # - %name% - Replaces with the players name, Example: "Notch".
    # - %displayname% - Replaces with the players display name, Example: "[Owner] Notch".
    # - %uuid% - Replaces with the players UUID.
    # - %crate% - The crate types name.
    # - %prize% - The name of the winning.
    # - %percentage% - Percentage of the winning, useful for "Chance Message".
    # - %rand;100;500% - Generates a random number between two numbers, example is between 100 and 500.
    # ------------------------------------------
    # Don't change the config version!

    Config Version: 6
    Update Checks: true
    Update Branch: spigot
    Metrics: true
    Default Opener: BasicGUI
    Default Cooldown: 5
    Crate Protection: false
    Disable Key Swapping: false
    Default Hologram Text:
    - '%crate%'
    - Right-Click to Open!
    - Left-Click to Preview!
    Crates:
      OmegaCrate!:
        Winnings:
          '1':
            Type: COMMAND
            Item Type: TRIPWIRE_HOOK
            Percentage: 50
            Commands:
            - crate key %name% omegacrate!
            Name: '&e2 Omega Crate Keys!'
            Item Data: 0
            Amount: 2
          '2':
            Type: COMMAND
            Item Type: TRIPWIRE_HOOK
            Percentage: 30
            Commands:
            - crate key %name% betacrate!
            Name: '&61 Beta Crate Key!'
            Item Data: 0
            Amount: 1
          '3':
            Type: COMMAND
            Item Type: TRIPWIRE_HOOK
            Percentage: 18
            Commands:
            - crate key %name% alphacrate!
            Name: '&c1 Alpha Crate Key!'
            Item Data: 0
            Amount: 1
          '4':
            Type: COMMAND
            Item Type: TRIPWIRE_HOOK
            Percentage: 1
            Commands:
            - crate key %name% donatorcrate!
            Name: '&51 Donator Crate Key!'
            Item Data: 0
            Amount: 1
        Key:
          Item: TRIPWIRE_HOOK
          Name: '%type% Crate Key'
          Enchanted: true
        Knockback: 0.0
        Broadcast: false
        Firework: false
        Preview: true
        Block: CHEST
        Color: YELLOW
      AlphaCrate!:
        Winnings:
          '1':
            Type: ITEM
            Item Type: DIAMOND_CHESTPLATE
            Name: '&4[&cAlpha Chestplate&4]'
            Item Data: 0
            Percentage: 5
            Amount: 1
            Enchantments:
            - PROTECTION-3
          '2':
            Type: ITEM
            Item Type: DIAMOND_LEGGINGS
            Name: '&4[&cAlpha Leggings&4]'
            Item Data: 0
            Percentage: 5
            Amount: 1
            Enchantments:
            - PROTECTION-3
          '3':
            Type: ITEM
            Item Type: DIAMOND_SWORD
            Item Data: 6
            Percentage: 5
            Name: '&4[&cAlpha Sword&4]'
            Amount: 1
            Enchantments:
            - SHARPNESS-3
            - UNBREAKING-2
            - LOOTING-1
          '4':
            Type: ITEM
            Item Type: DIAMOND_PICKAXE
            Name: NONE
            Item Data: 0
            Percentage: 10
            Amount: 1
            Enchantments:
            - EFFICIENCY-2
            - UNBREAKING-2
          '5':
            Type: ITEM
            Item Type: BOW
            Name: '&4[&cAlpha Bow&4]'
            Item Data: 0
            Percentage: 10
            Amount: 1
            Enchantments:
            - UNBREAKING-2
            - POWER-2
            - INFINITY-1
          '6':
            Type: ITEM
            Item Type: GLASS
            Name: NONE
            Item Data: 0
            Percentage: 30
            Amount: 32
          '7':
            Type: ITEM
            Item Type: WOOL
            Name: NONE
            Item Data: 0
            Percentage: 30
            Amount: 32
          '8':
            Type: ITEM
            Item Type: LIGHT_BLUE_SHULKER_BOX
            Name: NONE
            Item Data: 0
            Percentage: 3
            Amount: 1
          '9':
            Type: ITEM
            Item Type: ENDER_CHEST
            Name: NONE
            Item Data: 0
            Percentage: 2
            Amount: 1
        Key:
          Item: TRIPWIRE_HOOK
          Name: '%type% Crate Key'
          Enchanted: true
        Knockback: 0.0
        Broadcast: false
        Firework: false
        Preview: true
        Block: CHEST
        Color: RED
      DonatorCrate!:
        Winnings:
          '1':
            Type: ITEM
            Item Type: DIAMOND_HELMET
            Name: '&5[&dDonator Helmet&5]'
            Item Data: 0
            Percentage: 5
            Amount: 1
            Enchantments:
            - PROTECTION-6
            - THORNS-3
          '2':
            Type: ITEM
            Item Type: DIAMOND_CHESTPLATE
            Name: '&5[&dDonator Chestplate&5]'
            Item Data: 0
            Percentage: 5
            Amount: 1
            Enchantments:
            - PROTECTION-6
            - THORNS-3
          '3':
            Type: ITEM
            Item Type: DIAMOND_LEGGINGS
            Item Data: 6
            Percentage: 5
            Name: '&5[&dDonator Leggings&5]'
            Amount: 1
            Enchantments:
            - PROTECTION-6
            - THORNS-3
          '4':
            Type: ITEM
            Item Type: DIAMOND_BOOTS
            Name: '&5[&dDonator Boots&5]'
            Item Data: 0
            Percentage: 5
            Amount: 1
            Enchantments:
            - PROTECTION-6
            - THORNS-3
          '5':
            Type: ITEM
            Item Type: DIAMOND_SWORD
            Name: '&5[&dDonator Sword&5]'
            Item Data: 0
            Percentage: 2
            Amount: 1
            Enchantments:
            - UNBREAKING-6
            - LOOTING-4
            - SHARPNESS-8
          '6':
            Type: ITEM
            Item Type: BOW
            Name: '&5[&dDonator Bow&5]'
            Item Data: 0
            Percentage: 8
            Amount: 1
            Enchantments:
            - UNBREAKING-6
            - POWER-6
            - PUNCH-2
            - INFINITY-1
          '7':
            Type: ITEM
            Item Type: EMERALD_BLOCK
            Name: NONE
            Item Data: 0
            Percentage: 20
            Amount: 2
          '8':
            Type: ITEM
            Item Type: MAGENTA_SHULKER_BOX
            Name: NONE
            Item Data: 0
            Percentage: 20
            Amount: 1
          '9':
            Type: COMMAND
            Item Type: PAPER
            Commands:
            - eco give %name% 15000
            Name: $15,000
            Item Data: 0
            Percentage: 30
            Amount: 1
        Key:
          Item: TRIPWIRE_HOOK
          Name: '%type% Crate Key'
          Enchanted: true
        Knockback: 0.0
        Broadcast: false
        Firework: false
        Preview: true
        Block: CHEST
        Color: LIGHT_PURPLE
      BetaCrate!:
        Winnings:
          '1':
            Type: ITEM
            Item Type: DIAMOND_SWORD
            Name: NONE
            Item Data: 0
            Percentage: 2
            Amount: 1
            Enchantments:
            - DAMAGE_ALL-2
          '2':
            Type: ITEM
            Item Type: IRON_PICKAXE
            Name: NONE
            Item Data: 0
            Percentage: 5
            Amount: 1
            Enchantments:
            - EFFICIENCY-2
          '3':
            Type: ITEM
            Item Type: CARPET
            Item Data: 6
            Percentage: 1
            Name: '&d[&eDaddy''s Collar&d]'
            Amount: 1
          '4':
            Type: ITEM
            Item Type: BREAD
            Name: NONE
            Item Data: 0
            Percentage: 30
            Amount: 10
          '5':
            Type: ITEM
            Item Type: IRON_INGOT
            Name: NONE
            Item Data: 0
            Percentage: 10
            Amount: 25
          '6':
            Type: ITEM
            Item Type: EMERALD
            Name: NONE
            Item Data: 0
            Percentage: 2
            Amount: 5
          '7':
            Type: ITEM
            Item Type: COOKED_CHICKEN
            Name: NONE
            Item Data: 0
            Percentage: 30
            Amount: 20
          '8':
            Type: ITEM
            Item Type: LEASH
            Name: NONE
            Item Data: 0
            Percentage: 10
            Amount: 1
          '9':
            Type: ITEM
            Item Type: BONE
            Name: NONE
            Item Data: 0
            Percentage: 6
            Amount: 15
        Key:
          Item: TRIPWIRE_HOOK
          Name: '%type% Crate Key'
          Enchanted: true
        Knockback: 0.0
        Broadcast: false
        Firework: false
        Preview: true
        Block: CHEST
        Color: GOLD
     
    Any help is appreciated. :)
     
    #1 LexKitty_CC, Nov 15, 2017
    Last edited: Nov 16, 2017
  2. Although i haven't used the plugin myself but from snooping around i saw that the author was using DURABILITY instead of UNBREAKING so i believe that you should be using enchantment names as written on here
    https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html

    UNBREAKING > DURABILITY
    SHARPNESS > DAMAGE_ALL
    POWER > ARROW_DAMAGE
    INFINITY > ARROW_INFINITE
    LOOTING > LOOT_BONUS_MOBS

    hope it works.
     
  3. That fixed the enchantment mess, thanks!

    The third items are still showing up as damaged tho :confused: Anyone else have any ideas?
     
  4. You can not use item data because it makes the items damaged
     
  5. I hadn't even seen I had left something in the item data spot because I had copied the format from another one of the crates where it was used... I'm dumb :p Thank you!
     

Share This Page