Commands

Work in progress!

With the update to GiantShop 2.0, there a few new features and commands also some of the old commands have changed.
First of all it is now possible to use the shop command as /s too which is A LOT shorter! :) Combine this with the old shorter versions of the parameters, and it should be obvious that speed of usage has MASSIVELY improved in GiantShop 2.0! And that should pretty much be enough for a short description, so let's get on with the actual commands! :)

Starting with the shop commands themselves...

  • | "or"; [] "required argument"; () "optional argument"

General commands

  • /shop (help|h|?) (page) (or /s (h|?) (page))
    • This command gives you access to the help pages of GiantShop! It will only show you the entries that you have access to as well!
  • /shop list|l (page) (or /s l (page))
    • This command will get all the items that are in the shop for you. The optional page parameter can be used to browse between pages!
  • /shop check|c [item] (or /s c [item])
    • This command will get all information on the given item from the database. The item can be both a name, or an id. Though incase a name is given, currently it should be noted that spaces should be replaced with a "_". So if you were to for example want to check green wool you would enter the command as: /shop check green_wool or /shop check 35:5
  • /shop buy|b [item] (amount) (or /s b [item] (amount))
    • This command enables you to buy items from the shop! The item can be given both as a name, or id. However, when an item name contains a space, it is currently replaced with a "_". So if you were to for example want to buy 1 stack of green wool you would enter the command as: /shop buy green_wool or /shop buy 35:5
  • /shop sell|s [item] (amount) (or /s s [item] (amount))
    • This commands is almost the same as the buy command with the biggest difference being that this item sells back to the store!
  • /shop gift|g [receiver] [item] (amount) (or /s g [receiver] [item] (amount))
    • This command is one of GiantShop key points! Because this command enables you to gift that special someone a nice little item from the shop! :) It works almost the same as the buy command with the addition that in this case you add a parameter with the name of the receiving user.

Administration commands

  • /shop sendhelp|sh [user] (page) (or /s sh [user] (page))
    • This command gives you the ability to send the GiantShop help page X to the given user! This is usefull for when a user needs help with even getting the help page open! YES, those users actually exist... It will also only show the user the entries that it has access too, so keep this in mind, as it might not be the same amount of entries as you yourself can see!
  • /shop add|a [item] [amount per stack] [sellFor] (buyFor) (stock) (maxStock)
    • This command enables you to add items to the shop! the command works partially the same as the buy, sell and gift command. However, in this case "amount per stack" sets how much a stack contains. This stack is then multiplied by the amount that the buy, sell or gift command passes along, and handed to the player. The sellFor argument is the price that a buying player has to pay per stack of items that he buys and the buyFor command is the exact opposite as it is the amount of money that a player receives from the shop when he sells the given item back to the shop! Both the sellFor and buyFor command can be set to -1, however, only one of the 2 can be -1! If they are set to -1 it pretty much means that either selling or buying is disabled. The optional stock parameter sets the start amount that the shop contains of the given item. If this parameter is set to -1 it means the shop will not use the stock for this item. The final parameter is the optional maxStock parameter and contains the maximum amount of items that can be in the shop at any given time! If this parameter is set to -1 it means that the shop will not use a maximum stock for this item. It will also be ignored when stock is set to -1.
  • /shop update|u
    • This command is of the changed commands, and has most probably received the most changes of all the commands in the GiantShop base package.
    • It requires you to select an item from the database, you can do this using:
      • /shop update|u select [item]
        • Where the item parameter is the same as with all the other commands.
    • After this you can use:
      • /shop update|u show
        • This will show you all currently stored data of the item. Note: This data does not have to be stored in the database yet!
      • /shop update|u set [kind] [new value]
        • This command will allow you to actually change the values of the item! So if you say want to update the stock of the item to 50, you would use the command: /shop update|u set stock 50
      • /shop update|u save
        • This command will allow you to actually save the new item data. This is done so that you can now actually review if the changes you made are correct BEFORE pushing it to everyone else!
  • /shop remove|r [item]
    • This command pretty much enables you to remove the given item from the database.

Console only commands
Like the old GiantShop, GiantShop 2.0 has a couple commands that are only accessible from the console. The data is exported in a CSV format, and can be found in the folder: plugins/GiantShop/csvs. These commands are the following:

  • shop export|e (type)
    • This command enables you to export the tables from the GiantShop 2.0 database! If you do not pass the type parameter along, it will export all available data in the database. If you want to export only a certain type of data, you can use:
      • s e i or shop export items
        • This command exports only the items table
      • s e s or shop export shops
        • This command exports only the shops table, and contains a minor easter egg! :)
      • s e d or shop export discounts
        • This command exports only the discounts table, however as discounts are not currently supported yet, this will not do too much.
  • shop import|i (-t:[type]) (-p:[path]) (-f:[file]) (-c:[commence])
    • This command is going to seem a little confusing at first, but when you look at it will actually make sense! :) If you do not pass any parameters along, it will by default attempt to import the items data. By default it will get it from the items.csv file located at plugins/GiantShop/csvs. And it will also automatically commence the import.
    • The -t parameter enables you set the type you want to import, this can be any of the following: items, i, shops, s, discounts, d
    • The -p paramater enables you to change the directory where GiantShop 2.0 looks for the file. for example C:/
    • The -f paremeter enables you to tell GiantShop 2.0 the file that it should import from. By default the name for this file would be the same as the file that gets exported.
    • The -c parameter takes either a true of false. And enables you to set if GiantShop 2.0 should actually commence the import or if it should only check if it can import the file.
  • shop importLegacy|iL (-p:[path]) (-f:[file]) (-c:[commence])
    • This command is rather cool! As it allows you to import your old data.csv file from GiantShop 1.0! It takes almost the same parameters as the import command, the only difference being that there is no -t:type parameter.
  • shop truncate|t (type)
    • This command enables you to truncates the tables from the GiantShop 2.0 database!
      • s t items or shop truncate items
        • This command truncates only the items table
      • s t shops or shop truncate shops
        • This command truncates only the shops table, and contains a minor easter egg! :)
      • s t discounts or shop truncate discounts
        • This command truncates only the discounts table, however as discounts are not currently supported yet, this will not do too much.