
GShop
This is an add-on for Gunpowder that implements a shop system in the game, allowing players to buy and sell various items and services.
Available Commands
The mod provides several useful commands for interacting with shops:
/shop <shopname>
- opens the specified shop (requires permissiongshop.viewshop.<shopname>
)/showshop <target> <shopname>
- opens a shop for another player (requiresgshop.showshop
)/shopconfigurator export-itemstack
- returns the string NBT representation of the item in your main hand (requiresgshop.config
)
Configuration Settings
The shop system is configured through YAML configuration:
shops: # list of shops
- name: "default" # each shop has a name
categories: # shops are divided into categories
- name: "items" # categories have an icon and list of entries
icon:
type: "ITEM_STACK" # icon type is always ITEM_STACK
stack: "{id:\"minecraft:apple\",Count:1b}" # items are given as NBT strings
entries:
- type: "ITEM_STACK" # entries can be ITEM_STACK or COMMAND
stack: "{id:\"minecraft:apple\",Count:1b}"
priceToBuy: 10 # buy and sell price in gunpowder currency
priceToSell: 10
- name: "commands" # another category
icon:
type: "ITEM_STACK"
stack: "{id:\"minecraft:stone_pickaxe\",Count:1b,tag:{Damage:0}}"
entries:
- type: "COMMAND" # another type of entry
command: "lp user --buyer-- permission set test.test true" # --buyer-- will be replaced with buyer name
icon: "{id:\"minecraft:stone\",Count:1b,tag:{RepairCost:0,display:{Name:'{\"text\":\"Permission Node: test.test\"}'}}}" # These strings can be copied from the /shopconfigurator export-itemstack
command, with the item in your hand
priceToBuy: 100