Shop - Conjurate
- Creating your first shop
- Linking a page to another
- Creating a shop NPC
- Replacing the buy and sell GUI
- Creating your first shop sign (TODO)
Shop can be complex at the start, but it gets a lot easier once you get used to it.
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", once found type the name of the page you created into the ''.
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?Creating a shop NPC
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 we made in the previous tutorial something else then just do /shop page manage NAME-YOU-USED-HERE
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-JUST-MADE-HERE %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.
Replacing the buy and sell GUI
1. Create your new NPC using /shop npc create name-here (The "name" used here is not what's displayed above the NPC's head)
2. Set the page of your new NPC so it opens to it when right-clicked by using /shop npc page page-here
It's that simple. If you would like to change the type of your npc, use the command /shop npc type type-here. To see a list of types use the command /shop npc type.
To change the name of your NPC use /shop npc name name-here
Want to teleport to your NPC? /shop npc find
Want to move your NPC? /shop npc move
If you would like to use the Citizens plugin for the NPCs then simply select your NPC with Citizens, type /trait shop and then use /shop citizen page <page> to set the NPC's page.
1. Open the page you want to make into a GUI in the page editor. /shop page edit <page>
2. Add an item to your page or find an item already on your page and click on it in the editor.
3. Click on the top left item to toggle GUI mode for your page.
4. Design your GUI page to your liking.
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.
5. Once you're done creating your GUI page, open up Shop's config.yml.
6. If you want to use your page as the buy GUI then find PURCHASE_GUI and put your page's name into the ''. If you want to use your page as the sell GUI then find SELL_GUI and put your page's name into the ''.
7. Reload the config by using /shop reload in game.
HOw Can i put signs ???