redo the /give commands to work without IDs

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    /give Player Number additional parameters.



    Player is a String resolving to a player name

    Number is required so if first is a number, Player defaults to user

    If additional-parameters are numbers, use /give_id for each number.





    If additional-parameters are words ("" not required)

    And you say "/give 100 Hull" it would find "Grey Hull", "White Hull", "Grey Hull Wedge", ...

    It says that the unique element of shortest (number of words) results is "Grey | White | Red | ...", thus you have to add at least one of these words to get your item.

    It says that there are 0 to 1 optional words "Wedge, Penta, Tetra, Corner", excluding words mentioned above (colors)

    If you say "/give_first 100 Hull" it would default to the first result (ID or Blockconfig?), thus Grey over White and Basic Hull over Penta.



    Do you see any flaws in my idea?

    (It is BTW purely client side - gimme a .java example plugin which 1. gets user chat input and forwards it to the pipe 2. Has an array of blockID->blockName or something to create that array from; then I would do it myself )
     
    Joined
    Jun 23, 2013
    Messages
    221
    Reaction score
    25
    • Purchased!
    • Modder
    • Legacy Citizen 4
    This command already exists...

    /give_id is what gives you an item by block ID

    /give gives you based on the name. If it has more than one word in the name, put the full name inside quotes e.g. /give Titansmasher \"Grey Hull Wedge\" 100 will give me 100 Grey Hull Wedges
     
    Joined
    Aug 6, 2013
    Messages
    405
    Reaction score
    47
    I like the IDs. They are faster to type, plus i have a second monitor, i can have the list up there while i play.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    But you can\'t get \"Grey Hull\" from this command while \"Grey Hull Penta\" still exists.

    Moving your cursor in front of the last parameter (number) if you typed \"Salvage Beam-Computer\" accidentally \"Salvage-Beam Com\" is awful!