- You can now buy Permission for shovels.
- Options.Buy-Shop-Permissions
- If true, the player will need a permission to buy a permission to use the item (see below), this is a permanent purchase as you will purchase the permission.
Note that you need Vault for this to work.
- Install the update
- Start the server to update the config & files.
- Stop the server (reloading command won't work because splegg needs to load Vault)
- Set Buy-Shop-Permissions to true
- Set Options.Use-Vault-Permissions to true (Don't need the Options.Use-Vault one, that's for economy)
- In shovels.yml, if you don't want to delete it to generate a new file, below permission add permission-to-buy and add your permission to buy the item.
- Add the command to give the player the permission on commands-on-purchase.
- I could do this via Vault's API but if in the future Vault depedency for this is removed nothing will break.
Example using LuckPerms
Code (Text):
golden:
name: 'Golden Shovel'
lore:
- '&7Delay: &b0.2s'
- '&7Price: &b800'
permission: "splegg.gold"
permission-to-buy: "splegg.buy.gold"
delay: 0.2
slot: 1
price: 500
display-item: 'GOLD_SPADE : 1'
item: 'GOLD_SPADE : 1 : name:&6Golden Shovel'
commands-on-purchase:
- lp user %player% permission set splegg.gold true
Here, if the player has the permission
splegg.buy.gold he will be able to buy the shovel permission (and use for all games, permanent purchase), otherwise he won't be able to purchase the shovel. If he already has the
splegg.gold permission he can select the golden shovel at any time.
If you have OP you will have access to all shovels, so if you to test, deop yourself
Report bugs at Discussion or via PM.