Shop setup
Shop Setup
First thing you need to understand is the distinction between shop items and shop supported items.
- Shop items: A list of items that are in the store's stock. This is the list that is shown whenever a player views the shop.
- Shop supported items: All the items the shop is able to sell. In other words, those are the items you have configured and given meaning to.
Example:
Items set to be sold in the shop:
Hamburger, Iron Shovel, Diamond Sword, Hamsters.
If those items are not shop supported, even though they appear in the shop list, when a player tries to purchase them, he will receive a message saying: This item is not supported.
In order for those items to be able to be sold in the shop, you must configure them in the shopConfig.yml file.
For example, if you were to add the following configuration to the file:
Hamburger: i: - 5
By writing that in your shopConfig.yml file, the item becomes supported by the shop and can now be purchased.
Configuring Supported Items
As said earlier, in order for your shop to be able to sell items, you must first make them shop supported.
To do that:
- Navigate to Plugins/VotePoints/shop.
- Open up shopConfig.yml with any text editor.
Now you have to decide on shop supported item names, and what that item will actually give to the player upon purchase.
For example, I want to sell an item which will be called MobSkeleton (CaSe-SeNsItIvE), which will give the player the permission to disguise himself as a skeleton. In addition, upon purchase I want the item to automatically disguise the player:
MobSkeleton: 1234p: - mobdisguise.skeleton 1234c: - md skeleton,mobdisguise.skeleton
- MobSkeleton -> The name of the desired item.
- 1234 -> Means four spaces. DO NOT USE TABS
- p: -> states that the item will give a permission
- mobdisguise.skeleton -> The permission to give.
- c: -> states that item will execute a command
- md skeleton -> The command to execute, without / .
- , -> seperator between command and permission. No spaces can be between command, comma and permission.
- mobdisguise.skeleton -> The permission required in order for the player to execute the command. For now it's obligatory, if no permission is required, type n.p
Item Configuration Flags
- p -> Give permission
- p:permission to give
- i -> Give item
- i:item id to give
- c -> Execute command, permission definition required.
- c:command to execute,permission needed for command
- g -> Put in group
- g:group name
Special Formatting Codes
If you need to put the player currently buying something from the store's name, when setting up the shop item, use: &pName
Example: manuadd &pName members.
Customizing Shop
There are 2 ways of doing that:
In-Game Commands
If you have all permissions necessary:
To add a shop item:
Type "/vp addshopitem [item] [price] [description]",
while replacing [item] with one of the supported items, [price] with the amount of voting points you want this item to be worth, and [description] with a short description of the item.
To remove a shop item:
Type "/vp removeshopitem [item]",
while replacing [item] with a shop item.
Changing name, price or description of an item:
Type "/vp changeXXXX [item name/id] [new value]",
while replacing XXXX with either name, price or desc depending on what you wish to do,
[item name/id] with the item's name or it's id in the voting shop, and [new value] with the new name, price or description accordingly.
Clearing the shop
To clear the shop, rendering it out of stock, simply type in: "/vp clearshop".
Manually
- Navigate to plugins/VotePoints.
- Open the file shopItemConfig.yml with any text editor.
- Follow the following format:
Supported Item Name: 1234price:price of item 1234:desc:description of item
- Supported Item Name -> Any name from the items you have configured in shopConfig.yml.
- 1234 -> Four spaces. NO TABS
- price -> Price of the item. Integers only!
- desc -> Description of item.