Packages and commands

To create a package you will need to go to the "Packages" section in the Buycraft control panel. From there you will be able to create packages and categories and view your existing content. 
On the package edit page, you can change all the settings relating to that package. Further down the page, you will see the settings for the package and then you will find the commands section.
Buycraft uses plugin commands to define what a player will receive after purchasing the package. It can be a collection of default Minecraft commands or plugin commands.  Commands are then executed on the server when a player purchases the package.

Commands execute on your server in the order that they appear in the control panel. You can drag the commands to the order which you would like them to execute.

You can also find more advanced settings for each command from the popup after clicking the blue edit button like specific servers, require online/offline, delay and repeat commands.

Command types

There are a few different types of commands which will execute based on the status of a payment. For types other than Initial and Expiry, make sure that you have the IPN/Pingback/Webhooks set up for the gateway you are using, otherwise, your webstore might not get the notification to change the status of the payment or execute these commands. You can find the setup guides for those in the gateway guides  HERE.

Initial commands

Initial commands will execute when the player first purchases the package. For example would be to give the player a Diamond pickaxe - to do this you would enter the command "give {name} 279 1". The {name} variable will replace the variable with the players Minecraft username, like this, "give Notch 279 1". However, depending on the game type of your webstore you may need to use a different variable for the player name, see below.

Expiry commands

Expiry commands will be executed after the period you set on your package edit page. An example of this would be removing permissions from a player after their package has expired. These commands are also executed when a player cancels their subscription.

Renewal commands

Renewal commands are executed when the player is charged for a renewal of their subscription. 

Chargeback commands

These commands will be executed if a player opens a dispute or a chargeback on the payment. An example of this type of command would be to banning the user if they perform a chargeback.

Refund commands

These commands will be executed if you refund a customer. This could be used to remove the package from their account.

Which variables should I use for identifying the player?

As we support the use of multiple game types for your store we support slightly different ways of getting a player name or their relevant ID with a command.

Minecraft: Java

  • {name} - This will return the player's username
  • {uuid} - This will return the players UUID


  • {username} - This will return the player's username
  • {id} - This will return the players Xbox live XUID

Minecraft: Offline

  • {name} - This will return the username the player used to log into your store

Command variables

  • {name} - The customers Minecraft username. 
  • {username} - The customers username. 
  • {uuid} - The UUID of the player. (Only supported on the Minecraft: Java game type)
  • {id} - The XUID of the player. (Only supported on Minecraft game type)
  • {transaction} - The transaction ID of the payment.
  • {price} - The amount paid.
  • {currency} - The currency of the payment.
  • {time} - The time of purchase, e.g. 15:30.
  • {date} - The date of purchase, e.g. 01/01/2012.
  • {email} - The email address of the customer.
  • {ip} - The IP address of the customer.
  • {packageId} - The ID of the package.
  • {packagePrice} - The price of the package.
  • {packageExpiry} - The expiry length of the package (days).
  • {packageName} - The name of the package.
  • {purchaserName} - The name of the player who purchased a gift package. 
  • {purchaserUuid} - The UUID of the player who purchased a gift package.
For more details on custom variables see our  Variables article.

Still need help? Contact Us Contact Us