Pet JSON Commands

When are the commands run?

The commands you add have different 'reasons' for when they are run, These reasons are listed below:

  • SPAWN - Will run the commands listed when the pet is spawned

  • REVOKE - Will run the commands listed when the pet is removed

  • RIDE - Will run the commands listed when the player mounts the pet

  • RIDE_DISMOUNT - Will run the commands listed when the player dismounts off the pet

  • HAT - Will run the commands listed when the pet is put on the players head

  • TELEPORT - Will run the commands listed when the pet teleports

  • FAILED - Will run the commands listed when a task for the pet fails to run (like failed spawning)

Command Placeholders

We have added some placeholders to the pet commands, there could always be more added but these are the current ones added:

Placeholder
Description

{petX}

This is the X coordinate of the pet

{petY}

This is the Y coordinate of the pet

{petZ}

This is the Z coordinate of the pet

{ownerX}

This is the X coordinate of pets owner

{ownerY}

This is the Y coordinate of pets owner

{ownerZ}

This is the Z coordinate of pets owner

{ownerName}

This is the name for the player who spawned the pet

{petName}

This is the pets display name

{petType}

This is the type of pet (EG: COW, PIG, ETC.)

{petUUID}

The UUID for the pet

Some examples of how to add commands

  "commands": {
    "SPAWN": [
      "say {ownerName} has spawned the {petType} pet"
    ],
    "REVOKE": [
      "say {ownerName} has removed the {petType} pet",
      "tell {ownerName} would you like to spawn another? Type /pet gui"
    ],
    "RIDE": [
      
    ],
    "RIDE_DISMOUNT": [
      
    ],
    "HAT": [
      
    ],
    "TELEPORT": [
      
    ],
    "FAILED": [
      "tell {ownerName} An error occurred when trying this task"
    ]
  }

}

Last updated