1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dissecting a Advanced /give Command

Discussion in 'Plugins/Codes' started by Dan9erTheGamer, Aug 20, 2016.

  1. Dan9erTheGamer

    Dan9erTheGamer Member

    Joined:
    Jan 3, 2016
    Messages:
    124
    Likes Received:
    19
    Trophy Points:
    18
    Gender:
    Male
    Location:
    Canada
    Home Page:
    Hi! If you don't know already this is a series on the forums, called Dissecting Commands! Here I will take super long commands and format them so they become understandable.

    First, the obligatory full command:
    Code:
    /give @p diamond_sword 1 0 {display:{Name:God Sword,Lore:["The best of everything.","\"Mr. Random Crits\" is still better though..."]},ench:[{id:16,lvl:5},{id:19,lvl:2},{id:20,lvl:2},{id:21,lvl:3},{id:34,lvl:3},{id:70,lvl:1}]}
    This command simply gives this item to the nearest player:
    DissectingGive.PNG

    Here is the dissected code.
    Code:
    /give
        @p    // give to closest player
        diamond_sword     // item is Diamond Sword
        1    // one item
        0    // item has full durablity
        { // start of NBT tags
            display:
            {
                Name:God Sword, // coustom item name
                Lore: // item description
                [
                    "The best of everything.",
                    "\"Mr. Random Crits\" is still better though..."
                ] // end of "Lore:"
            }, // end of "display:"
            ench: // enchantments
            [
                {
                    id:16, // Sharpness
                    lvl:5  // V
                },
                {
                    id:19, // Knockback
                    lvl:2  // II
                },
                {
                    id:20, // Fire Aspect
                    lvl:2  // II
                },
                {
                    id:21, // Looting
                    lvl:3  // III
                },
                {
                    id:34, // Unbreaking
                    lvl:3  // III
                },
                {
                    id:70, // Mending
                    lvl:1  // I
                }
            ] // end of "ench:"
        } // end of NBT tags
    // end of command
     
    Last edited: Aug 22, 2016
  2. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,533
    Likes Received:
    1,476
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    Why coding this on Java is easier than this for me ;-;
     
    justin2001plays and FalseHonesty like this.
  3. FalseHonesty

    FalseHonesty Mod Staff Member Moderator

    Joined:
    Mar 5, 2016
    Messages:
    872
    Likes Received:
    555
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    My Computer
    Location:
    My House
    Home Page:
    ^ ;)
     
  4. Flareon73

    Flareon73 Member

    Joined:
    Jul 1, 2016
    Messages:
    118
    Likes Received:
    17
    Trophy Points:
    18
    Gender:
    Male
    I love this!!

    Keep doing this until you die!!

    LOL:p
     
  5. Skylord_Duck

    Skylord_Duck Member

    Joined:
    Aug 30, 2016
    Messages:
    86
    Likes Received:
    6
    Trophy Points:
    8
    Gender:
    Male
    Very nice concept! I used to do similar things to understand commands. It was very helpful =)

    I really do not know why I stopped! :eek:

    Oh. Oops. It appears this thread is a bit older than I thought!
     
  6. xFirelion

    xFirelion Member

    Joined:
    May 7, 2016
    Messages:
    953
    Likes Received:
    902
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    The best feeling when people call you a hacker :)
    Location:
    The Netherlands.
    oh damn so sick boii