Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Command Management

Himbeer edited this page Jun 6, 2020 · 8 revisions

Table of Contents

Creating a buyable command

To create a new buyable command, you have to think of the following things:

  • A name for the command: This is the name of the buyable command, it is used to identify it when setting its price, buying it, creating a sign for it etc.
  • Command to be executed: This command is going to be executed from the console when a player pays for the command. You may use one of the different variables which will automatically be replaced. When the command gets executed.

Now you can create the command:

Use this command format: /cshop add name command Replace "name" with the name for the command you just thought of. Replace "command" with the command to be executed, DON'T put a slash in front of it.

Example: /cshop add superpowers effect {player} regeneration 100 10

After you created the command you have to set a price for it:

Setting the price of a buyable command:

Things you have to think of:

  • The name of the command you want to set the price of: This must be the name of a buyable command that has already been created.
  • The pay-type of the command: This can be money (player has to pay a specific amount of money for the command to be executed, this works with EconomyAPI only for the time being) or item (player has to pay a specific count of an item for the command to be executed)
    • When using money: The amount of money
    • When using item: The item and amount, it must be written in one of the following formats:
      • name:damage:count Example: With diamond:0:10 the price will be set to 10 diamonds.
      • id:damage:count Example: With 1:0:64 the price will be set to 64 stone blocks.
Notice: Damage and count don't have to be set, they default to 0 for damage and 1 for count. Example: diamond would be enough for the item string.

Notice 2: A list of item IDs can be found here: https://minecraft.gamepedia.com/Bedrock_Edition_data_values

Now you can set the price:

Use this command format: /cshop setprice name money/item amount/item Replace "name" with the name of the command you want to set a price to. Replace "money/item" with the pay type you want. Replace "amount/item" either with the amount of money the players have to pay (e.g. 100) or the item the players have to pay (e.g. diamond:0:10).

Example: /cshop setprice superpowers money 10 or /cshop setprice superpowers item diamond:0:5

Other useful commands:

Notice: name has obviously always to be replaced with the buyable command's name you wish to modify.

/cshop remove name - Delete a buyable command.

/cshop info name - Display info about a buyable command.

/cshop list - List all buyable commands.

/cshop help - Displays a link to this wiki. xD