Skip to content

Shop Management

The /htshop command collection provides comprehensive tools for building and managing the in-game shop system.

Base Command

/htshop - Shop admin commands

Permission: htskyblock.admin.shop

Shop Structure

The shop is organized into categories, each containing items that players can buy or sell.

  • Categories - Top-level organization (e.g., "Blocks", "Tools", "Food")
  • Items - Actual items players can purchase or sell
  • Non-Items - Command/permission entries that execute actions on purchase

Category Management

addcategory

Create a new shop category using your held item as the category icon.

Usage: /htshop addcategory <name>

Permission: htskyblock.admin.shop.addcategory

Steps: 1. Hold the item you want as the category icon 2. Run /htshop addcategory "Category Name" 3. The category is created with your held item as the icon

Example:

# Hold a chest, then:
/htshop addcategory "Storage"

# Hold a pickaxe, then:
/htshop addcategory "Tools"

Category Icons

Choose recognizable items as category icons to help players quickly identify shop sections.

delcategory

Delete a shop category. Items in the category are not deleted, they become uncategorized.

Usage: /htshop delcategory <name>

Permission: htskyblock.admin.shop.delcategory

Example:

/htshop delcategory "Old Category"

Item Management

additem

Add the item you're holding to the shop in a specific category.

Usage: /htshop additem <category>

Permission: htskyblock.admin.shop.additem

Steps: 1. Hold the item you want to add 2. Run /htshop additem "Category Name" 3. The item is added to that category

Features: - Automatically detects item metadata (custom names, enchantments, etc.) - Creates unique entries for items with different metadata - Uses item ID as display name by default

Example:

# Hold a diamond pickaxe, then:
/htshop additem "Tools"

# Hold a renamed "Super Sword", then:
/htshop additem "Weapons"

removeitem

Remove the item you're holding from the shop.

Usage: /htshop removeitem

Permission: htskyblock.admin.shop.removeitem

Steps: 1. Hold the item you want to remove 2. Run /htshop removeitem 3. The item is removed from all shop listings

changeitemcategory

Move the item you're holding to a different category.

Usage: /htshop changeitemcategory <category>

Permission: htskyblock.admin.shop.changeitemcategory

Example:

# Hold an iron pickaxe, then:
/htshop changeitemcategory "Basic Tools"

Non-Item Entries

Non-item entries are shop listings that execute commands or grant permissions instead of giving items. Use these for ranks, perks, or special actions.

addnonitem

Add a command-only entry using your held item as the icon.

Usage: /htshop addnonitem <category> <displayname>

Permission: htskyblock.admin.shop.addnonitem

Steps: 1. Hold an item to use as the entry's icon 2. Run /htshop addnonitem "Category" "Display Name" 3. Set the entry's command/permission (see below)

Example:

# Hold a golden crown item, then:
/htshop addnonitem "Ranks" "VIP Rank"

# Then set what it does:
/htshop command "VIP Rank" "lp user {player} parent set vip"

removenonitem

Remove a non-item entry by its display name.

Usage: /htshop removenonitem <name>

Permission: htskyblock.admin.shop.removenonitem

Example:

/htshop removenonitem "VIP Rank"

changenonitemcategory

Move a non-item entry to a different category.

Usage: /htshop changenonitemcategory <name> <category>

Permission: htskyblock.admin.shop.changenonitemcategory

Example:

/htshop changenonitemcategory "VIP Rank" "Premium"

Pricing

buyprice

Set the buy price for the item you're holding (what players pay to buy it).

Usage: /htshop buyprice <amount>

Permission: htskyblock.admin.shop.buyprice

Examples:

# Hold a diamond, then:
/htshop buyprice 100

# Remove buy price (make it not purchasable):
/htshop buyprice remove

sellprice

Set the sell price for the item you're holding (what players receive when selling it).

Usage: /htshop sellprice <amount>

Permission: htskyblock.admin.shop.sellprice

Examples:

# Hold a diamond, then:
/htshop sellprice 75

# Remove sell price (make it not sellable):
/htshop sellprice remove

Buy vs Sell Prices

Typically, sell prices are lower than buy prices to create a functional economy. For example, diamonds might cost $100 to buy but only sell for $75.

nonitembuyprice

Set the buy price for a non-item entry.

Usage: /htshop nonitembuyprice <name> <amount>

Permission: htskyblock.admin.shop.nonitembuyprice

Examples:

/htshop nonitembuyprice "VIP Rank" 5000
/htshop nonitembuyprice "Fly Time" 1000

# Remove price:
/htshop nonitembuyprice "VIP Rank" remove

Command Chaining

command

Set a console command to execute when a non-item entry is purchased.

Usage: /htshop command <name> <command>

Permission: htskyblock.admin.shop.command

Placeholders: - {player} - Replaced with the buyer's username

Examples:

# Grant a permission:
/htshop command "VIP Rank" "lp user {player} parent set vip"

# Give fly time:
/htshop command "1 Hour Fly" "isdev flytime add {player} 3600"

# Teleport player:
/htshop command "Spawn TP" "tp {player} spawn"

# Multiple commands (add command multiple times):
/htshop command "Starter Kit" "give {player} Wood_Oak_Planks 64"
/htshop command "Starter Kit" "give {player} Soil_Dirt 32"

Commands Run as Console

All commands are executed as console, giving them full permission. Be careful with what commands you allow.

perm

Set a permission to grant when a non-item entry is purchased.

Usage: /htshop perm <name> <permission>

Permission: htskyblock.admin.shop.perm

Examples:

/htshop perm "VIP Rank" "server.vip"
/htshop perm "Fly Access" "htskyblock.fly"

Permissions with LuckPerms

If using LuckPerms or another permission plugin, prefer using the /htshop command to execute that plugin's commands for more control over temporary permissions, groups, etc.

Item Metadata

metadata

Set or clear item metadata for an item in the shop.

Usage: /htshop metadata <set/clear>

Permission: htskyblock.admin.shop.metadata

Commands: - set - Copy metadata from your held item - clear - Remove metadata from the shop item

Examples:

# Hold an enchanted diamond sword with custom name, then:
/htshop metadata set

# Clear metadata from the current held item's shop entry:
/htshop metadata clear

Metadata includes: - Custom names - Enchantments - Lore text - Durability - Any other NBT data

Common Workflows

Adding a Simple Item

  1. Hold the item (e.g., diamond)
  2. Add it to a category: /htshop additem "Gems"
  3. Set buy price: /htshop buyprice 100
  4. Set sell price: /htshop sellprice 75

Adding a Rank Purchase

  1. Hold an icon item (e.g., golden crown)
  2. Create non-item entry: /htshop addnonitem "Ranks" "VIP Rank"
  3. Set the price: /htshop nonitembuyprice "VIP Rank" 5000
  4. Set the command: /htshop command "VIP Rank" "lp user {player} parent set vip"

Creating a Starter Kit

  1. Hold an icon (e.g., chest)
  2. Create non-item entry: /htshop addnonitem "Kits" "Starter Kit"
  3. Set price: /htshop nonitembuyprice "Starter Kit" 0 (free)
  4. Add multiple commands:
    /htshop command "Starter Kit" "give {player} Wood_Oak_Planks 64"
    /htshop command "Starter Kit" "give {player} Soil_Dirt 32"
    /htshop command "Starter Kit" "give {player} Item_Bucket_Water 1"
    /htshop command "Starter Kit" "give {player} Item_Bucket_Lava 1"
    

Moving Items Between Categories

  1. Hold the item you want to move
  2. Run: /htshop changeitemcategory "New Category"

Removing Old Listings

  1. Hold the item to remove
  2. Run: /htshop removeitem

Or for non-items:

/htshop removenonitem "Entry Name"

Shop Data Storage

Shop configuration is stored in plugins/HTSkyBlock/shop.json:

{
  "categories": [
    {
      "name": "Blocks",
      "iconId": "Furniture_Crude_Chest_Small"
    }
  ],
  "items": [
    {
      "itemId": "Soil_Dirt",
      "displayName": "Dirt",
      "category": "Blocks",
      "buyPrice": 10.0,
      "sellPrice": 5.0
    }
  ]
}

Manual Editing

You can manually edit shop.json, but be careful with JSON formatting. Always run /htskyblock reload after editing.

Permission Summary

Command Permission
Base htskyblock.admin.shop
addcategory htskyblock.admin.shop.addcategory
delcategory htskyblock.admin.shop.delcategory
additem htskyblock.admin.shop.additem
removeitem htskyblock.admin.shop.removeitem
changeitemcategory htskyblock.admin.shop.changeitemcategory
addnonitem htskyblock.admin.shop.addnonitem
removenonitem htskyblock.admin.shop.removenonitem
changenonitemcategory htskyblock.admin.shop.changenonitemcategory
buyprice htskyblock.admin.shop.buyprice
sellprice htskyblock.admin.shop.sellprice
nonitembuyprice htskyblock.admin.shop.nonitembuyprice
command htskyblock.admin.shop.command
perm htskyblock.admin.shop.perm
metadata htskyblock.admin.shop.metadata

Grant all shop admin permissions:

permissions:
  htskyblock.admin.shop.*