Shop - Conjurate

Aug 17, 2019
Shop - Conjurate

  • - Creating your first shop
    - Linking a page to another
    - Creating a shop NPC (requires Citizens)
    - Replacing the buy and sell GUI
    - Creating your first shop sign

    Shop has a lot of functionality. These tutorials will help you get started. There's many other things you can create and do that aren't discussed here but more tutorials and information will be added in the future. If you want to add a tutorial for something not explained here then feel free to.

    Creating your first shop

    Creating a shop is a lot simpler than you think, you just have to get used to how the plugin works.
    Let's start by creating your first shop page and putting an item in it that players can buy.

    1. Use the command /shop page create menu (This will create a new page called MENU)
    2. Make sure you have the item you want to sell in your inventory.
    3. Use the command /shop page edit (Since we just created a new page, the manager has us set to that page)

    The command you ran will bring up your page's inventory, from here you can edit an item's properties, remove an item, or add an item.

    4. Right-click the item in your inventory and then click on the slot you want to move it into on your page.

    If you shift right-click, it will allow you to manually move items. However, using this method does not transfer an item's properties. Shift right-click again to save what you have done.

    You have now added an item to your page, but it doesn't do anything just yet.

    5. Left-click the item you added to your page and it will bring up the item's properties.
    6. Click on the emerald named "Change Function".
    7. Click on the emerald named "Buy", this will set the item's function to buy, allowing players to buy the item.

    Now that your item can be bought, you need to set the cost of it otherwise players can get the item for free.

    8. On the properties page, left-click on the gold ingot item named "Change Cost".
    9. Enter the amount you want it to be bought for in the chat.

    The properties should open back up and your item now has a price on it.

    10. Close the editor.

    So you now have a page with an item you can buy, but we need a way to access your page. There's many ways for players to be able to access your page.

    In the last steps, we'll make it open the page when they use the command /shop.

    11. Go into your plugins folder of your server and open the Shop folder.
    12. Open the config.yml in the Shop folder and find "MAIN_PAGE" and set the value of it to the exact name of the page you want the command to open.
    13. Save the config.yml and use the command /shop reload in-game.
    14. Use the command /shop and your page should open up for you to see and your item you added should be there for you to buy.

    Linking a page to another

    Now you can access your page and buy an item from it. That's great and all but what about linking pages together?

    1. First, let's make the new page which we will be taken to. Create the new page you want to be taken to. (step 1 of previous tutorial)
    2. After you've created it, we don't need to touch it for now. Use the command /shop page manage menu

    If you named your page what we made in the previous tutorial something else then just do /shop page manage <page>

    3. Grab an item to add to your page which we will use to take us to the new page.
    4. Use the command /shop page edit (This should open the page editor for the page we made in the previous tutorial, so it should have the purchasable item in it)
    5. Right-click the item you want to use and click on a slot in your page to move it.
    6. Left-click the item you moved into the page and then change the function to "Command".
    7. An item at the very bottom right of the item's properties should now be visible. The item is named "Manage Commands"
    8. Left-click the "Manage Commands" item to add a new command to run when our item is clicked.
    9. Enter "shop open page page-you-made %player%" without the quotation marks.
    10. Close the editor, use the command /shop and click on the item you just added and it should take you to your empty new page.

    There's a placeholder you can use to take a player back to the page they were just on. The placeholder is %shop_previous% and would be used like this: shop open page %shop_previous% %player%

    Try creating an item that takes you back to the page you were just at on your new page.

    Creating a shop NPC (Requires Citizens)

    Make sure you have Citizens installed on your server.

    1. Create your NPC with /npc create <name> (or select an npc with /npc select)
    2. Use the command /trait shop (to allow players to open the page)
    3. Set the page you would like the NPC to have with /shop citizen page <page>

    It's that simple. You should now be able to right-click your NPC and your shop will open.

    Replacing the buy and sell GUI

    1. Create a new page to use as your GUI. /shop page create <entry>
    2. Set your page to a GUI by doing /shop page properties and clicking the command block(GUI).
    3. Design your GUI page to your liking with the normal /shop page edit.

    The quantity function is used for players to interact with to increase and decrease the quantity they desire. When an item has the quantity function, if a player left-clicks it then it will increase the quantity by the amount set on the quantity function. If a player right-clicks it then it will decrease the quantity by the amount set on the quantity function.

    4. Once you're done creating your GUI page, open up Shop's config.yml.
    5. If you want to use your page as the buy GUI then find PURCHASE_GUI and put your page's name into the double single quotes. If you want to use your page as the sell GUI then find SELL_GUI and put your page's name into the double single quotes.
    6. Reload the config by using /shop reload in game.


    Creating your first shop sign

    1. Edit a sign and on line 1 put "//shop//" without the quotation marks.
    2. On line 2 put the page's name you'd like players to open to when interacting with the sign.

    That's all there is to making a sign for shop.
  • Loading...
  • Loading...