diff --git a/docs/wiki/site/permission/index.html b/docs/wiki/site/permission/index.html index 967e1ca88..c211b58be 100644 --- a/docs/wiki/site/permission/index.html +++ b/docs/wiki/site/permission/index.html @@ -362,6 +362,24 @@ + + +
  • + + + Minimum Required Permissions + + + +
  • + +
  • + + + All Permissions + + +
  • @@ -581,6 +599,24 @@ + + +
  • + + + Minimum Required Permissions + + + +
  • + +
  • + + + All Permissions + + +
  • @@ -603,13 +639,41 @@

    Permission

    The following permissions are available in PetBlocks.

    -

    Levels

    +

    Levels

    +

    Minimum Required Permissions

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    PermissionLevelDescription
    petblocks.commandUserAllows to use the /petblocks command.
    petblocks.pet.spawnUserRequired permission to see the pet. If you remove this permission from a player, the pet automatically despawns.
    petblocks.pet.amount.1UserThe slot where the pet is stored. 1 is the default slot.
    +

    All Permissions

    @@ -625,6 +689,21 @@

    Levels

    + + + + + + + + + + + + + + + @@ -670,26 +749,11 @@

    Levels

    - - - - - - - - - - - - - - - @@ -710,11 +774,6 @@

    Levels

    - - - - - @@ -730,6 +789,16 @@

    Levels

    + + + + + + + + + + @@ -795,11 +864,6 @@

    Levels

    - - - - - @@ -815,11 +879,6 @@

    Levels

    - - - - - @@ -864,6 +923,16 @@

    Levels

    + + + + + + + + + +
    Allows to use the /petblocks command.
    petblocks.pet.spawnUserRequired permission to see the pet. If you remove this permission from a player, the pet automatically despawns.
    petblocks.pet.amount.1UserThe slot where the pet is stored. 1 is the default slot.
    petblocks.pet.amount.[number]UserThe slot where the pet is stored. e.g. petblocks.pet.amount.1 (slot 1) and petblocks.pet.amount.2 (slot 2)
    petblocks.gui.petblocks_main_menu User Allows to access the main GUI of PetBlocks. Allows to see the help messages.
    petblocks.reloadAdminPermission to use the /petblocks reload command.
    petblocks.pet.createAdmin/UserAllows to create a new pet. This command should probably be executed by a GUI / Sign / Server Management Plugin. If you set receivePetsOnJoin in the config.yml, you do not need this permission.
    petblocks.pet.call User Allows to call the pet to the owner.
    petblocks.pet.spawnUserMinimum required permission a player has to have in order to have a pet. If you remove this permission from a player, the pet automatically despawns.
    petblocks.pet.ride User Allows to ride a pet. Allows to list the pets of a player
    petblocks.pet.deleteAdmin/UserAllows to delete a pet. It depends on the type of server if you want to give this permission to your players. This command should be executed by a GUI / Sign / Server Management Plugin.
    petblocks.pet.displayName User Allows to rename a pet. Allows to despawn at pet.
    petblocks.pet.createAdmin/UserAllows to create a new pet. This command should probably be executed by a GUI / Sign / Server Management Plugin. If you set receivePetsOnJoin in the config.yml, you do not need this permission.
    petblocks.pet.deleteAdmin/UserAllows to delete a pet. It depends on the type of server if you want to give this permission to your players. This command should be executed by a GUI / Sign / Server Management Plugin.
    petblocks.pet.skin Admin/User Allows to change the skin via command. This command should probably be executed by a GUI / Sign / Server Management Plugin. Allows to change the template of a pet.
    petblocks.pet.manipulateOtherAdminAllows to manipulate the pets of other players. e.g. Changing skins, etc.
    petblocks.pet.select Admin/User Allows to mark a pet as selected. This is helpful for placeholders. If you give your players access to petblocks.pet.create, each individual template is still locked by this permission.
    petblocks.pet.amount.[number]Admin/UserIf you give your players access to petblocks.pet.create, the access to the slot where the pet is stored. e.g. petblocks.pet.amount.1 (slot 1) and petblocks.pet.amount.2 (slot 2)
    petblocks.pet.breakBlock Admin/User Allows to use the /petblocks breakblock command Admin Allows to use the /petblocks variable command
    petblocks.pet.manipulateOtherAdminAllows to manipulate the pets of other players. e.g. Changing skins, etc.
    petblocks.reloadAdminPermission to use the /petblocks reload command.
    diff --git a/docs/wiki/site/receivingpets/index.html b/docs/wiki/site/receivingpets/index.html index ff38641e3..dc2b93c5f 100644 --- a/docs/wiki/site/receivingpets/index.html +++ b/docs/wiki/site/receivingpets/index.html @@ -690,6 +690,7 @@

    Giving Pets to Players

    with template classic for you and makes it spawn in front of you. If you cannot see the pet, try executing /petblocks call pet or review your permissions again.

    Make sure your players have this permission to see their pet:

    petblocks.pet.spawn
    +petblocks.pet.amount.1   
     

    The next step is to decide, how you want your players to receive a pet. There are multiple options below.

    Receiving a pet on first join

    diff --git a/docs/wiki/site/search/search_index.json b/docs/wiki/site/search/search_index.json index d7c05a63a..a04a44cd0 100644 --- a/docs/wiki/site/search/search_index.json +++ b/docs/wiki/site/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"

    PetBlocks is a Minecraft Bukkit plugin to use blocks as pets in minecraft.

    PetBlocks v8 Docs

    Are you looking for the old wiki? You can download it here. A copy can also be found in the web archive.

    "},{"location":"#features","title":"Features","text":""},{"location":"api/","title":"Api","text":"

    PetBlocks offers a Developer Api, however it is not published to Maven Central or any other distribution system yet. You need to directly reference the PetBlocks.jar file.

    "},{"location":"api/#usage","title":"Usage","text":"

    Add a dependency in your plugin.yml

    softdepend: [ PetBlocks]\n

    Take a look at the following example:

    public class YourPlugin extends JavaPlugin {\n    @Override\n    public void onEnable() {\n        // Always gets the same instance of the PetService.\n        PetService petService = Bukkit.getServicesManager().load(PetService.class);\n\n        Player player = Bukkit.getPlayer(\"YourPlayerName\");\n        Plugin plugin = this;\n\n        // GetPetsFromPlayerAsync may retrieve the pet from the Database or the InMemory cache.\n        petService.getPetsFromPlayerAsync(player).thenAccept(pets -> {\n            // Main Thread\n            if (pets.size() > 0) {\n                // Do not keep the pet instance in your plugin (e.g. in fields). Always retrieve it with getPetsFromPlayerAsync.\n                // If you need to keep the pet instance in high performance scenarios, check if the pet has already been disposed before using it with pet.isDisposed().\n                Pet pet = pets.get(0);\n\n                // All pet methods are safe to be called regardless if the pet is currently spawned or not.\n                pet.call();\n                // Changes are automatically applied to the pet if it is spawned and automatically persisted.\n                pet.setDisplayName(\"Hello World\");\n                pet.setLoop(\"idle\");\n            }\n        }).exceptionally(error -> {\n            plugin.getLogger().log(Level.SEVERE, \"Failed to load pets.\", error);\n            return null;\n        });\n    }\n}\n

    "},{"location":"commands/","title":"Commands","text":"

    PetBlocks is a command line based pet plugin. This means, you can fully control the pets using commands, which may be executed by players, console, other plugins, command blocks.

    e.g. Letting the pet named pet of player Steve98 move to a certain location from the console. (The pet has to be in a nearby location)

    /petblocks moveto pet <x> <y> <z> <speed> [player]\n
    petblocks moveto pet 250 5 300 0.2 Steve98\n

    Removing the pet under certain conditions

    You can always take a way the petblocks.pet.spawn permission to remove the pet from players, if they enter certain areas (e.g. joining minigames, entering regions, etc.)

    "},{"location":"commands/#command-petblock","title":"Command /petblock","text":"

    Required Permission: petblocks.command

    "},{"location":"commands/#petblock","title":"/petblock","text":"

    Opens the main GUI of petblocks. You can configure this command in the gui/petblocks_main_menu.yml file.

    "},{"location":"commands/#command-petblocks","title":"Command /petblocks","text":"

    Required Permission: petblocks.command

    "},{"location":"commands/#petblocks-create","title":"/petblocks create","text":"
    /petblocks create <name> <template> [player]\n

    Creates a new pet for the player with the given pet template.

    "},{"location":"commands/#petblocks-delete","title":"/petblocks delete","text":"
    /petblocks delete <name> [player]\n

    Deletes the pet of the player.

    "},{"location":"commands/#petblocks-list","title":"/petblocks list","text":"
    /petblocks list [player]\n

    Lists all pets of a player.

    "},{"location":"commands/#petblocks-call","title":"/petblocks call","text":"
    /petblocks call <name> [player]\n

    Spawns and teleports the pet in front of the owner.

    "},{"location":"commands/#petblocks-lookat","title":"/petblocks lookat","text":"
    /petblocks lookat <name> <x> <y> <z> [player]\n

    Makes the pet look at the given location.

    "},{"location":"commands/#petblocks-lookatowner","title":"/petblocks lookatowner","text":"
    /petblocks lookatowner [player]\n

    Makes the pet look at the owner.

    "},{"location":"commands/#petblocks-moveto","title":"/petblocks moveto","text":"
    /petblocks moveto <name> <x> <y> <z> <speed> [player]\n

    Makes the pet walk to a given location.

    "},{"location":"commands/#petblocks-movetoowner","title":"/petblocks movetoowner","text":"
    /petblocks movetoowner <name> <speed> [player]\n

    Makes the pet walk to the owner.

    "},{"location":"commands/#petblocks-hat","title":"/petblocks hat","text":"
    /petblocks hat <name> [player]\n

    Makes the owner wear the pet.

    "},{"location":"commands/#petblocks-ride","title":"/petblocks ride","text":"
    /petblocks ride <name> [player]\n

    Makes the owner ride the pet.

    "},{"location":"commands/#petblocks-unmount","title":"/petblocks unmount","text":"
    /petblocks unmount <name> [player]\n

    Makes the owner unmount (stop riding/hat) the pet.

    "},{"location":"commands/#petblocks-teleport","title":"/petblocks teleport","text":"
    /petblocks teleport <name> <world> <x> <y> <z> <yaw> <pitch> [player]\n

    Teleports the pet to the given location.

    "},{"location":"commands/#petblocks-velocity","title":"/petblocks velocity","text":"
    /petblocks velocity <name> <x> <y> <z> [player]\n

    Launches the pet into the given direction.

    "},{"location":"commands/#petblocks-velocityrel","title":"/petblocks velocityrel","text":"
    /petblocks velocityrel <name> <mx> <my> <mz> [oy] [player]\n

    Launches the pet into the current looking direction with the given multipliers.

    "},{"location":"commands/#petblocks-skintype","title":"/petblocks skintype","text":"
    /petblocks skintype <name> <material> [durability] [player]\"\n

    Changes the material used as a head.

    "},{"location":"commands/#petblocks-skinnbt","title":"/petblocks skinnbt","text":"
    /petblocks skinnbt <name> <nbt> [player]\n

    Changes the NBT tags of the head item.

    Works in Minecraft versions below 1.20.5. Use the /petblocks skincomponent command for Minecraft >= 1.20.5.

    "},{"location":"commands/#petblocks-skincomponent","title":"/petblocks skincomponent","text":"
    /petblocks skincomponent <name> <datacomponent> [player]\n

    Changes the Data Component tags of the head item. Data Components replace NBT tags since the release of Minecraft 1.20.5.

    See https://minecraft.wiki/w/Data_component_format for details. Use the /petblocks skinnbt command for Minecraft server below 1.20.5.

    "},{"location":"commands/#petblocks-skinbase64","title":"/petblocks skinbase64","text":"
    /petblocks skinbase64 <name> <skin> [player]\n

    Changes the head material to player_head and sets the base64 encoded texture url.

    "},{"location":"commands/#petblocks-skinheaddatabase","title":"/petblocks skinheaddatabase","text":"
    /petblocks skinheaddatabase <name> <hdbId> [player]\n

    Changes the head material to player_head and sets the texture url from a skin loaded by the HeadDatabase plugin.

    "},{"location":"commands/#petblocks-rename","title":"/petblocks rename","text":"
    /petblocks rename <name> <displayname> [player]\n

    Changes the display name of the pet. Does not accept spaces. Underlines '_' are automatically replaced by spaces. Allows values should be set in the config.yml.

    "},{"location":"commands/#petblocks-visibility","title":"/petblocks visibility","text":"
    /petblocks visibility <name> <type> [player]\n

    Changes who can see the pet.

    "},{"location":"commands/#petblocks-loop","title":"/petblocks loop","text":"
    /petblocks loop <name> <loop> [player]\n

    Changes which loop from the template is being executed by the pet. Example loops are idle.

    "},{"location":"commands/#petblocks-template","title":"/petblocks template","text":"
    /petblocks template <name> <template> [player]\n

    Changes the template of a pet without recreating the pet.

    "},{"location":"commands/#petblocks-spawn","title":"/petblocks spawn","text":"
    /petblocks spawn <name> [player]\n

    Spawns the pet if it has not already spawned.

    "},{"location":"commands/#petblocks-despawn","title":"/petblocks despawn","text":"
    /petblocks despawn <name> [player]\n

    Despawns the pet if it has not already despawned.

    "},{"location":"commands/#petblocks-toggle","title":"/petblocks toggle","text":"
    /petblocks toggle <name> [player]\n

    Toggles the pet spawn state.

    "},{"location":"commands/#petblocks-select","title":"/petblocks select","text":"
    /petblocks select <name> [player]\n

    Makes the owner select one of his pets as primary pet. This is only helpful if a single player has got multiple pets in PetBlocks-Premium.

    "},{"location":"commands/#petblocks-openheaddatabase","title":"/petblocks openheaddatabase","text":"
    /petblocks openheaddatabase <name> [player]\n

    Opens the headDatabase inventory with a special hook, which applies the next item you select in the headdatabse gui to the pet.

    "},{"location":"commands/#petblocks-breakblock","title":"/petblocks breakblock","text":"
    /petblocks breakblock <name> <timeToBreak> <dropType> [player]\n

    Breaks the block the pet is looking at. There is a placeholder, which contains the name of the block type. This command only works on blocks, if the player executing the command has got the permission to break this specific block. The command is cancel able using the cancel command. Breaking a block is automatically cancelled on certain actions. e.g. a pet looks at a player, a pet starts moving

    "},{"location":"commands/#petblocks-cancel","title":"/petblocks cancel","text":"
    /petblocks cancel <name> [player]\n

    Cancels any long running actions like breaking a block.

    "},{"location":"commands/#petblocks-snap","title":"/petblocks snap","text":"
    /petblocks snap <name> [player]\n

    Rotates the pet to the exact line of the nearest x or z axe.

    "},{"location":"commands/#petblocks-moveforward","title":"/petblocks moveforward","text":"
    /petblocks moveforward <name> <speed> [player]\n

    Lets the pet move forward in its current direction. Executing the snap command before executing this is helpful to move in a straight direction. If the pet reaches a cliff (1 block difference), moving forward stops.

    "},{"location":"commands/#petblocks-rotaterel","title":"/petblocks rotaterel","text":"
    /petblocks rotaterel <name> <direction> <angle> [player]\n

    Rotates the pet relative to its current rotation.

    "},{"location":"commands/#petblocks-entitytype","title":"/petblocks entitytype","text":"
    /petblocks entitytype <name> <entityType> [player]\n

    Changes the entity type of the pet. The default type is minecraft:armor_stand

    "},{"location":"commands/#petblocks-entityvisible","title":"/petblocks entityvisible","text":"
    /petblocks entityvisible <name> <true/false> [player]\n

    Changes if the body of an entity is visible. For armorstands this is false, for most of the other entities this should be true.

    "},{"location":"commands/#petblocks-groundoffset","title":"/petblocks groundoffset","text":"
    /petblocks groundoffset <name> <offset> [player]\n

    Changes the offset of the body of the entity to the ground. Useful when configuring different entity types.

    "},{"location":"commands/#petblocks-variable","title":"/petblocks variable","text":"
    /petblocks variable <name> <key> <value> [player]\n

    Sets the value of the variable with the given key. This is useful store arbitrary data into the pet. e.g. health, selected particle, selected sound, etc.

    "},{"location":"commands/#command-petblocksgui","title":"Command /petblocksgui","text":"

    Required Permission: petblocks.command

    "},{"location":"commands/#petblocksgui-open","title":"/petblocksgui open","text":"
    /petblocksgui open <name> [arguments.../player]\n

    Starts a new GUI session and opens the GUI with the given name for the executing player. If any other GUIs were open when executing this command, they get discarded from the navigation history.

    Samples:

    /petblocksgui open simple_sample_menu\n
    /petblocksgui open simple_sample_menu / Pikachu\n
    /petblocksgui open simple_sample_menu 123456\n
    /petblocksgui open simple_sample_menu 123456 abcde / Pikachu\n
    "},{"location":"commands/#petblocksgui-next","title":"/petblocksgui next","text":"
    /petblocksgui next <name> [arguments.../player]\n

    Reuses the existing GUI session (or starts a new one if it is not available) and opens the GUI with the given name for the executing player. If any other GUIs were open when executing this command, they get put into the navigation history. Executing /petblocksgui back reopens the previous GUI.

    "},{"location":"commands/#petblocksgui-back","title":"/petblocksgui back","text":"
    /petblocksgui back [player]\n

    Checks if the current GUI session contains a previously opened GUI. If that is the case, the previous GUI is opened and the current GUI is discarded. If not GUI is found, the current GUI is simply closed.

    "},{"location":"commands/#petblocksgui-close","title":"/petblocksgui close","text":"
    /petblocksgui close [player]\n

    Closes the current GUI and clears the GUI session and navigation history.

    "},{"location":"custommodels/","title":"Custom Models","text":"

    PetBlocks can be used to build custom pets with custom models. A bee model is shown below.

    "},{"location":"custommodels/#tutorial","title":"Tutorial","text":"

    Important

    There are even more ways to achieve custom model pets in modern Minecraft versions. This is only one way to do it.

    A pet in PetBlocks is an Armorstand with an item on its head. The NBT tags of this item can be freely manipulated in your pet.yml. Therefore, we can add the NBT tag called CustomModelData on the itemstack and display a custom model instead of the block item.

    The first step is to create a resource pack. A good starting point to create a resource pack with CustomModelData can be found here: https://www.planetminecraft.com/forums/communities/texturing/new-1-14-custom-item-models-tuto-578834/

    Secondly, update the NBT tags in the pet.yml file.

    nbt: '{CustomModelData:mycustommodelname}'

    "},{"location":"faq/","title":"FAQ","text":""},{"location":"faq/#can-i-use-petblocks-to-attack-enemies-eg-zombies-or-other-players","title":"Can I use PetBlocks to attack enemies (e.g. Zombies) or other players?","text":"

    Pets in PetBlocks can be programmed in the pet.yml file to perform such behaviors. You would need a PlaceHolderApi placeholder which contains the location of the entity you want to attack (will be added in a future update to PetBlocks, but there may already be plugins out there, which provide that). Then, create a new loop where the pet moves to to the entity using the /petblocks moveTo <x> <y> <z> command. Once the pet is near the entity, make it jump using /petblocks velocity <x> <y> <z> and execute command to damage the entity /damage @e[type=zombie,limit=1,sort=nearest] 20

    "},{"location":"faq/#how-can-i-use-petblocks-for-an-older-minecraft-version","title":"How can I use PetBlocks for an older Minecraft version?","text":"

    Maintaining backwards compatibility is very hard and actively discouraged by spigot. I do my best to add more and more workarounds. However, it has become so much work, that you can only download them by becoming a Patreon https://www.patreon.com/Shynixn.

    "},{"location":"gui/","title":"GUI","text":"

    PetBlocks comes with a powerful embedded GUI plugin, which supports Minecraft 1.8.9 - Latest.

    The default PetBlocks GUI can be opened with the command /petblock. Make sure you have all the required permissions for all GUI pages.

    "},{"location":"gui/#creating-your-own-gui","title":"Creating your own GUI","text":"

    The easiest way to get started is by editing the existing PetBlocks GUI and observing the changes.

    The workflow is like that:

    "},{"location":"gui/#starting-from-scratch","title":"Starting from Scratch","text":"
    1. Copy the simple_sample_menu.yml and rename it to my_first_menu.yml.
    2. Open the my_first_menu.yml in an editor like VSCode or NotePad++
    3. At the top of the file change the unique identifier of the GUI to
    name: \"my_first_menu\"\n
    1. Join your server and execute the following command. This command should always be executed after you have made changes in your .yml files.
    /petblocks reload\n
    1. Execute the following command to open your GUI.
    /petblocksgui open my_first_menu\n
    1. The GUI should now open for you. If it does not, check your console log for yaml file parsing errors. Correct your my_first_menu.yml or start over by deleting it.
    "},{"location":"gui/#attaching-a-custom-command-to-your-menu","title":"Attaching a custom command to your menu","text":"
    1. Let's assume you want to open the GUI with the command /mycoolgui.
    2. Edit the command section in your my_first_menu.yml to your needs.
    command: \"mycoolgui\"\n
    "},{"location":"gui/#customizing-the-gui-menu","title":"Customizing the GUI menu","text":"
    1. There are many different ways to customize the GUI. Like displaying the items, executing certain commands and hiding/showing items on certain conditions.
    2. Please take a look into the simple_sample_menu.yml file again. Each available options is explained with a short comments.
    3. If the comment mentiones Required. You need to set this property. If it says Optional you do not need to set it.
    4. As an easy test, locate the minecraft:gold_block in your my_first_menu.yml and replace it with minecraft:diamond_block. After you gave done that simply execute /petblocks reload again and open the GUI /mycoolgui.
    "},{"location":"permission/","title":"Permission","text":"

    The following permissions are available in PetBlocks.

    "},{"location":"permission/#levels","title":"Levels","text":" Permission Level Description petblocks.command User Allows to use the /petblocks command. petblocks.gui.petblocks_main_menu User Allows to access the main GUI of PetBlocks. petblocks.gui.petblocks_skins_menu User Allows to access the skins GUI of PetBlocks. petblocks.gui.petblocks_skins_blockskins_menu User Allows to access the block skins GUI of PetBlocks. petblocks.gui.petblocks_skins_petskins_menu User Allows to access the pet skins GUI of PetBlocks. petblocks.gui.petblocks_skins_vehicleskins_menu User Allows to access the vehicle skins GUI of PetBlocks. petblocks.gui.petblocks_skins_plushieskins_menu User Allows to access the vehicle skins GUI of PetBlocks. petblocks.gui.[gui-name] User Allows to access a specific gui. petblocks.pet.select User Allows to mark a pet as selected. Important for GUI petblocks.help User Allows to see the help messages. petblocks.reload Admin Permission to use the /petblocks reload command. petblocks.pet.create Admin/User Allows to create a new pet. This command should probably be executed by a GUI / Sign / Server Management Plugin. If you set receivePetsOnJoin in the config.yml, you do not need this permission. petblocks.pet.call User Allows to call the pet to the owner. petblocks.pet.spawn User Minimum required permission a player has to have in order to have a pet. If you remove this permission from a player, the pet automatically despawns. petblocks.pet.ride User Allows to ride a pet. petblocks.pet.hat User Allows to wear the pet like a hat petblocks.pet.unmount User Allows stop riding or stop wearing at pet petblocks.pet.list User Allows to list the pets of a player petblocks.pet.delete Admin/User Allows to delete a pet. It depends on the type of server if you want to give this permission to your players. This command should be executed by a GUI / Sign / Server Management Plugin. petblocks.pet.displayName User Allows to rename a pet. petblocks.pet.toggle User Allows to toggle a pet. petblocks.pet.despawn User Allows to despawn at pet. petblocks.pet.skin Admin/User Allows to change the skin via command. This command should probably be executed by a GUI / Sign / Server Management Plugin. petblocks.pet.skin.headDataBase Admin/User Allows to change the skin via the HeadDatabase plugin. This command should probably be executed by a GUI / Sign / Server Management Plugin. petblocks.pet.lookat Admin/User Allows to force the pet to look at a given location petblocks.pet.lookatOwner Admin/User Allows to force the pet to look at the owner petblocks.pet.moveto Admin/User Allows to force the pet to move to a given location petblocks.pet.movetoOwner Admin/User Allows to force the pet to move to the owner petblocks.pet.teleport Admin/User Allows to force the pet to teleport to a given location petblocks.pet.velocity Admin/User Allows to force the pet to fly to a given direction petblocks.pet.velocityRel Admin/User Allows to force the pet to fly to a given direction petblocks.pet.visibility Admin/User Allows to change the pet visibility. petblocks.pet.loop Admin/User Allows to change the pet loop. A loop is discussed further in the pet customization section. petblocks.pet.loop Admin/User Allows to change the pet loop. A loop is discussed further in the pet customization section. petblocks.pet.setTemplate Admin/User Allows to change the template of a pet. petblocks.pet.manipulateOther Admin Allows to manipulate the pets of other players. e.g. Changing skins, etc. petblocks.pet.select Admin/User Allows to mark a pet as selected. This is helpful for placeholders. petblocks.pet.openHeadDatabase Admin/User Allows to open the headDatabase menu using PetBlocks. petblocks.pet.template.[name] Admin/User If you give your players access to petblocks.pet.create, each individual template is still locked by this permission. petblocks.pet.amount.[number] Admin/User If you give your players access to petblocks.pet.create, the access to the slot where the pet is stored. e.g. petblocks.pet.amount.1 (slot 1) and petblocks.pet.amount.2 (slot 2) petblocks.pet.breakBlock Admin/User Allows to use the /petblocks breakblock command petblocks.pet.cancel Admin/User Allows to use the /petblocks cancel command petblocks.pet.snap Admin/User Allows to use the /petblocks snap command petblocks.pet.moveRel Admin/User Allows to use the /petblocks moveforward command petblocks.pet.rotateRel Admin/User Allows to use the /petblocks rotaterel command petblocks.pet.entityType Admin/User Allows to use the /petblocks entitytype command petblocks.pet.entityVisibility Admin/User Allows to use the /petblocks entityvisible command petblocks.pet.groundOffset Admin/User Allows to use the /petblocks groundOffset command petblocks.pet.variable Admin Allows to use the /petblocks variable command"},{"location":"placeholders/","title":"PlaceHolders","text":"

    The following placeholders are available in PetBlocks and can also be used via PlaceHolderApi.

    PlaceHolder Api

    As PetBlocks supports multiple pets per player, you need to select the pet in your placeholders. You can do this by appending the pet slot _1 _2 etc. or use the /petblocks select <name> command to set a pet as selected which can be retrieved using _selected. This results into placeholders such as e.g. %petblocks_pet_displayName_1% or %petblocks_pet_displayName_selected%. This is only relevant in external plugins. For actions in PetBlocks, you can directly use the placeholders below.

    Player PlaceHolders Description %petblocks_owner_name% Player name of the owner of a pet. %petblocks_owner_displayName% Player displayName of the owner of a pet. %petblocks_owner_locationWorld% Name of the world the owner of a pet is inside. %petblocks_owner_locationX% X coordinate of the owner of a pet. %petblocks_owner_locationY% Y coordinate of the owner of a pet. %petblocks_owner_locationZ% Z coordinate of the owner of a pet. %petblocks_owner_locationYaw% Yaw rotation of the owner of a pet. %petblocks_owner_locationPitch% Yaw rotation of the owner of a pet. %petblocks_owner_itemMainHand_type% Name of the item type in the owner's main hand %petblocks_owner_isFlying% True if the owner is currently flying, false if not. Pet PlaceHolders Description %petblocks_pet_name% Id of a pet %petblocks_pet_displayName% Displayname of a pet %petblocks_pet_distanceToOwner% Distance from the pet to the owner. If the owner is in another world, this value becomes very high. %petblocks_pet_isSpawned% True if the pet is spawned, false if not. %petblocks_pet_template% Name of the template a pet uses. %petblocks_pet_visibility% Visibility Type a pet uses. %petblocks_pet_isMounted% True if the owner rides the pet or uses it as a hat. %petblocks_pet_loop% Name of the loop a pet currently executes. %petblocks_pet_locationWorld% Name of the world the pet is inside. %petblocks_pet_locationX% X coordinate of the pet. %petblocks_pet_locationY% Y coordinate of the pet. %petblocks_pet_locationZ% Z coordinate of the pet. %petblocks_pet_locationYaw% Yaw rotation of the pet. %petblocks_pet_locationPitch% Yaw rotation of the pet. %petblocks_pet_itemType% The head item type of the pet. %petblocks_pet_itemNbt% The head item NBT of the pet. < 1.20.5 %petblocks_pet_itemComponent% The head item data component of the pet. >= 1.20.5 %petblocks_pet_itemHeadBase64% The head item Base64 Skin Url of the pet. %petblocks_pet_isBreakingBlock% True if the pet is currently breaking a block, false if not. %petblocks_pet_blockInFrontType% Name of the block type the pet is looking at Event Player PlaceHolders Description %petblocks_eventPlayer_name% Player name of the event trigger player. %petblocks_eventPlayer_displayName% Player displayName of the event trigger player. %petblocks_eventPlayer_locationWorld% Name of the world event trigger player of a pet is inside. %petblocks_eventPlayer_locationX% X coordinate of the event trigger player. %petblocks_eventPlayer_locationY% Y coordinate of the event trigger player. %petblocks_eventPlayer_locationZ% Z coordinate of the event trigger player. %petblocks_eventPlayer_locationYaw% Yaw rotation of the event trigger player. %petblocks_eventPlayer_locationPitch% Yaw rotation of the event trigger player. %petblocks_eventPlayer_itemMainHand_type% Name of the item type in the players's main hand %petblocks_eventPlayer_isFlying% True if the player is currently flying, false if not. GUI PlaceHolders Description %petblocks_player_name% Player name of the player clicking in the current inventory. %petblocks_player_displayName% Player displayName of the player session in the current inventory. %petblocks_gui_name% Name of the current inventory. %petblocks_gui_backName% Name of the previous inventory (if you have multiple sub pages) %petblocks_gui_param1% A GUI can have up to 9 parameters. This placeholders access number 1. %petblocks_gui_param2% A GUI can have up to 9 parameters. This placeholders access number 2. %petblocks_gui_param3% A GUI can have up to 9 parameters. This placeholders access number 3. %petblocks_gui_param4% A GUI can have up to 9 parameters. This placeholders access number 4. %petblocks_gui_param5% A GUI can have up to 9 parameters. This placeholders access number 5. %petblocks_gui_param6% A GUI can have up to 9 parameters. This placeholders access number 6. %petblocks_gui_param7% A GUI can have up to 9 parameters. This placeholders access number 7. %petblocks_gui_param8% A GUI can have up to 9 parameters. This placeholders access number 8. %petblocks_gui_param9% A GUI can have up to 9 parameters. This placeholders access number 9."},{"location":"receivingpets/","title":"Giving Pets to Players","text":"

    Once you have setup the permission, join your server. The PetBlocks default configuration creates a pet with template classic for you and makes it spawn in front of you. If you cannot see the pet, try executing /petblocks call pet or review your permissions again.

    Make sure your players have this permission to see their pet:

    petblocks.pet.spawn\n

    The next step is to decide, how you want your players to receive a pet. There are multiple options below.

    "},{"location":"receivingpets/#receiving-a-pet-on-first-join","title":"Receiving a pet on first join","text":"

    This is enabled per default and can be changed in the config.yml under pet/receivePetsOnJoin. This creates a new database entry for each joining player, regardless if he has the spawn permission or not. The player requires the minimum petblocks.pet.spawn to see their pet.

    If you want to receive no pets on join and unlock pets later own (e.g. for shops or VIP perks), change this to:

    pet:\n  receivePetsOnJoin: []\n

    If you want to receive multiple pets (PetBlocks-Premium only) on first join. Append other pets below it. They have to have different names.

    pet:\n  receivePetsOnJoin:\n    - name: \"pet1\"\n      template: \"classic\"\n    - name: \"pet2\"\n      template: \"classic\"      \n

    In order to configure, if the pet should automatically spawn in front of the player on creation, open the template plugins/PetBlocks/pets/pet_classic.yml. Set pet/spawned to true or false.

    "},{"location":"receivingpets/#receiving-pets-using-a-shop","title":"Receiving pets using a shop","text":"

    There are many ways how you can handle it. These are just examples below:

    "},{"location":"receivingpets/#option-1-just-selling-skins-for-your-pet-easy","title":"Option 1 - Just selling skins for your pet (easy)","text":"
    1. Build a shop GUI
    2. Keep the receive pet on join settings, the player should receive a pet everytime.
    3. Invent a new permission for each pet you would like to sell like petblocks.pettype.<yourpettype> e.g. petblocks.pettype.pikachu.
    4. Once a player buys the item in your shop, give them your newly invented permission e.g. petblocks.pettype.pikachu
    5. Show an item in your GUI to change the skin to pikachu only, if the player has got the newly invented permission e.g. petblocks.pettype.pikachu
    6. Execute the command with server level permission:
    /petblocks skinbase64 pet eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTdlYmNlZjQ2ODNjZGI3MTYzZTk2OWU0ZTIyNjlmMzY3M2E1ZDVlNmI3OGUwNmZhZWU0NWJjZjdjNDljMzk3In19fQ== %petblocks_owner_name%\n
    "},{"location":"receivingpets/#option-2-state-handling-of-pets-hard","title":"Option 2 - State handling of pets (hard)","text":"
    1. Build a shop GUI
    2. Disable receive pet on join like shown above
    3. Invent a new permission for each pet you would like to sell like petblocks.pettype.<yourpettype> e.g. petblocks.pettype.pikachu.
    4. Once a player buys the item in your shop, give them your new invented permission e.g. petblocks.pettype.pikachu
    5. Build a pet management GUI
    6. Create a new item which is only visible if the player has obtained the e.g. petblocks.pettype.pikachu permission.
    7. When the player clicks on that item, execute the following command with server level permission:
    /petblocks create <petName> <templateName> %petblocks_owner_name%\n

    Executing the create command multiple times is fine, it does not do anything if the pet already exists.

    "},{"location":"receivingpets/#option-3-free-creationdeletion-of-pets-for-players-easy","title":"Option 3 - Free creation/deletion of pets for players (easy)","text":"
    1. Give your players the permission to the following
    petblocks.pet.create\npetblocks.pet.delete\npetblocks.pet.amount.1\n
    1. Disable receive pet on join like shown above
    2. Build a shop GUI
    3. Once a player buys the item in your shop, give them the permission to the petblocks template e.g. petblocks.pet.template.classic.
    4. Let the player freely execute /petblocks create <petName> classic and /petblocks delete <petName> . You can also setup this in a GUI.
    "},{"location":"template/","title":"Template","text":"

    PetBlocks allows you to create templates, how a pet is going to look like and how it is going to behave. You can fully customize the behaviour and program the pets to perform certain actions.

    PetBlocks provides you with a starting pet template called classic, which can be found in the plugins/PetBlocks/pets/ folder. You can copy this template and start desigining your own pets. Make sure to give it a new unique template identifier.

    Modify a template and execute /petblocks reload to apply the changes to your pet.

    "},{"location":"template/#static-values","title":"Static Values","text":"

    Most of the static values are explained in the config file itself. Set them according to your needs.

    Example for static values are name, version and all initial pet settings under pet:.

    "},{"location":"template/#events","title":"Events","text":"

    Events define what actions to execute on certain events.

    The following events are supported:

    For example the leftClick event gets executed when a player left-clicks on the pet. However, it may not be the owner, who clicks on a pet, therefore you need to check if the player is the owner first as a condition.

    Example:

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"Open the pet GUI\" \n        condition:\n          type: STRING_EQUALS\n          left: \"%petblocks_eventPlayer_name%\"\n          right: \"%petblocks_owner_name%\"\n        type: \"COMMAND\"\n        level: \"PLAYER\"\n        run:\n          - \"/petblocks select %petblocks_pet_name%\"\n          - \"/petblock\"\n

    If you want to execute nothing when the player rightClicks on the pet, remove all actions.

    events:\n  rightClick:\n    actions: []\n
    "},{"location":"template/#building-a-new-action","title":"Building a new action","text":"

    PlaceHolders

    You can use placeholders almost anywhere when building actions. You can even use PlaceHolderApi based placeholders.

    Create a new action and give it an arbitrary name.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n

    Select the action type. Support actions are COMMAND, DELAY, JAVASCRIPT.

    "},{"location":"template/#command","title":"COMMAND","text":"

    Executes one or multiple commands as Console or Player.

    Vanilla Commands

    A vanilla command may automatically log to the console and to the chat of every op player. You can disable the output for op players using vanilla game rules such as /gamerule sendCommandFeedback false, /gamerule logAdminCommands false, /gamerule commandBlockOutput false. If you want to hide the output in your console (not recommend), you need to install a LogFilter plugin.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n
    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    "},{"location":"template/#delay","title":"DELAY","text":"

    Delays the next action for a certain amount of ticks.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"Delay Action\" # Required arbitrary name.\n        type: \"DELAY\" # Required action type.\n        ticks: 60 # Required for type DELAY. 60 Ticks delay.\n
    "},{"location":"template/#javascript","title":"JAVASCRIPT","text":"

    Executes JavaScript based Code for value calculation

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"JavaScript action\" # Required arbitrary name.\n        type: \"JAVASCRIPT\" # Required action type.\n        initial: \"Cool\" # Required for type JAVASCRIPT. The initial value of the result variable.\n        variable: \"myVariable\" # Required for type JAVASCRIPT. The name of the result variable, which can be read using PlaceHolders.\n        js: |                  # Required for type JAVASCRIPT. Actual multi line JavaScript code.\n          function createText() {\n             var text = \"%petblocks_js_myVariable%\" + \" Plugin\"\n             return text\n          }\n          createText();\n
    "},{"location":"template/#debugging-actions","title":"Debugging Actions","text":"

    When you start creating actions, it is very helpful to know, which action is currently being executed and how variables are evaluated. Every action can be logged to your server console by setting the optional debug: true property of an action.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"Delay Action\" # Required arbitrary name.\n        type: \"DELAY\" # Required action type.\n        ticks: 60 # Required for type DELAY. 60 Ticks delay.\n        debug: true # Optional flag to log this action to the console.\n
    "},{"location":"template/#restricting-actions","title":"Restricting Actions","text":""},{"location":"template/#permission","title":"Permission","text":"

    Actions can optionally have the permission tag:

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        permission: \"mycustom.permission\"\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    "},{"location":"template/#conditions","title":"Conditions","text":"

    Actions can optionally have conditions, which support the following types:

    Try to avoid using JAVASCRIPT because it requires more computation time. It should only be used if you want to create complex boolean expressions.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        condition: # Optional condition tag.\n          type: STRING_EQUALS # Required condition type.\n          left: \"%petblocks_eventPlayer_name%\" \n          right: \"%petblocks_owner_name%\"\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        condition: # Optional condition tag.\n          type: JAVASCRIPT # Required condition type.\n          js: \"Math.floor(Math.random() * 100) <= 50\" # 50% chance to execute this command.\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    "},{"location":"template/#loops","title":"Loops","text":"

    Loops define, what the pet should repeatedly do. You can customize and define your own loops using actions.

    Programmable Pets

    You can freely build new loops, delete loops and customize the behavior of pets. The actions allow full freedom to design your pets.

    "},{"location":"template/#idle-loop","title":"Idle Loop","text":"

    The idle loop explained:

    1. Delay Action
      1. We wait for 20 ticks.
    2. Look at owner with a 90% change.
      1. The JavaScript condition is evaluated, which returns true 90% of the time
      2. The console executes the command /petblocks lookatowner %petblocks_pet_name% %petblocks_owner_name%
    3. Switch to moveToOwner if pet is too far away
      1. The JavaScript condition is evaluated, if the distance of the pet to the owner is bigger than 7 blocks.
      2. If true, the console executes the command /petblocks loop %petblocks_pet_name% moveToOwner %petblocks_owner_name% , which switches the loop idle to the loop called moveToOwner.
      3. If false, this loop continous and starts again from the top with Delay Action
    loops:\n  idle: \n    actions:\n      - name: \"Delay Action\"\n        type: \"DELAY\"\n        ticks: 20\n      - name: \"Look at owner with a 90% change.\"\n        condition:\n          type: JAVASCRIPT\n          js: \"Math.floor(Math.random() * 100) <= 90\" # Calculate chance in JavaScript.\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks lookatowner %petblocks_pet_name% %petblocks_owner_name%\"\n      - name: \"Switch to moveToOwner if pet is too far away\"\n        condition:\n          type: JAVASCRIPT\n          js: \"%petblocks_pet_distanceToOwner% > 7\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks loop %petblocks_pet_name% moveToOwner %petblocks_owner_name%\"\n
    "},{"location":"template/#movetoowner-loop","title":"MoveToOwner Loop","text":"

    As we noticed that the loop changes to the loop moveToOwner, we take a look at this loop too.

    1. Recalculate path and start moving to owner.
      1. The console executes the command /petblocks moveToOwner %petblocks_pet_name% 0.2 %petblocks_owner_name%
    2. Switch to idle if the pet is beside the player
      1. The JavaScript condition is evaluated, if the distance of the pet to the owner is smaller than 4 blocks.
      2. If true, the console executes the command /petblocks loop %petblocks_pet_name% moveToOwner %petblocks_owner_name% , which switches the loop moveToOwner to the loop called idle.
      3. If false, the next action is executed.
    3. Teleport pet to player if the pet is too far away for the pathfinder.
      1. The JavaScript condition is evaluated, if the distance of the pet to the owner is bigger than 20 blocks.
      2. If true, the command is executed to teleport the pet to the owner location.
      3. If false, the next action is executed.
    4. Delay Action
      1. We wait for 20 ticks.
      2. The loop continous and starts again from the top with Recalculate path and start moving to owner
    loops:\n  moveToOwner:\n    actions:\n      - name: \"Recalculate path and start moving to owner.\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks moveToOwner %petblocks_pet_name% 0.2 %petblocks_owner_name%\"\n      - name: \"Switch to idle if the pet is beside the player\"\n        condition:\n          type: JAVASCRIPT\n          js: \"%petblocks_pet_distanceToOwner% < 4\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks loop %petblocks_pet_name% idle %petblocks_owner_name%\"\n      - name: \"Teleport pet to player if the pet is too far away for the pathfinder.\"\n        condition:\n          type: JAVASCRIPT\n          js: \"%petblocks_pet_distanceToOwner% > 20\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks teleport %petblocks_pet_name% %petblocks_owner_locationWorld% %petblocks_owner_locationX% %petblocks_owner_locationY% %petblocks_owner_locationZ% %petblocks_owner_locationYaw% %petblocks_owner_locationPitch% %petblocks_owner_name%\"\n      - name: \"Delay Action\"\n        type: \"DELAY\"\n        ticks: 20\n
    "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"

    PetBlocks is a Minecraft Bukkit plugin to use blocks as pets in minecraft.

    PetBlocks v8 Docs

    Are you looking for the old wiki? You can download it here. A copy can also be found in the web archive.

    "},{"location":"#features","title":"Features","text":""},{"location":"api/","title":"Api","text":"

    PetBlocks offers a Developer Api, however it is not published to Maven Central or any other distribution system yet. You need to directly reference the PetBlocks.jar file.

    "},{"location":"api/#usage","title":"Usage","text":"

    Add a dependency in your plugin.yml

    softdepend: [ PetBlocks]\n

    Take a look at the following example:

    public class YourPlugin extends JavaPlugin {\n    @Override\n    public void onEnable() {\n        // Always gets the same instance of the PetService.\n        PetService petService = Bukkit.getServicesManager().load(PetService.class);\n\n        Player player = Bukkit.getPlayer(\"YourPlayerName\");\n        Plugin plugin = this;\n\n        // GetPetsFromPlayerAsync may retrieve the pet from the Database or the InMemory cache.\n        petService.getPetsFromPlayerAsync(player).thenAccept(pets -> {\n            // Main Thread\n            if (pets.size() > 0) {\n                // Do not keep the pet instance in your plugin (e.g. in fields). Always retrieve it with getPetsFromPlayerAsync.\n                // If you need to keep the pet instance in high performance scenarios, check if the pet has already been disposed before using it with pet.isDisposed().\n                Pet pet = pets.get(0);\n\n                // All pet methods are safe to be called regardless if the pet is currently spawned or not.\n                pet.call();\n                // Changes are automatically applied to the pet if it is spawned and automatically persisted.\n                pet.setDisplayName(\"Hello World\");\n                pet.setLoop(\"idle\");\n            }\n        }).exceptionally(error -> {\n            plugin.getLogger().log(Level.SEVERE, \"Failed to load pets.\", error);\n            return null;\n        });\n    }\n}\n

    "},{"location":"commands/","title":"Commands","text":"

    PetBlocks is a command line based pet plugin. This means, you can fully control the pets using commands, which may be executed by players, console, other plugins, command blocks.

    e.g. Letting the pet named pet of player Steve98 move to a certain location from the console. (The pet has to be in a nearby location)

    /petblocks moveto pet <x> <y> <z> <speed> [player]\n
    petblocks moveto pet 250 5 300 0.2 Steve98\n

    Removing the pet under certain conditions

    You can always take a way the petblocks.pet.spawn permission to remove the pet from players, if they enter certain areas (e.g. joining minigames, entering regions, etc.)

    "},{"location":"commands/#command-petblock","title":"Command /petblock","text":"

    Required Permission: petblocks.command

    "},{"location":"commands/#petblock","title":"/petblock","text":"

    Opens the main GUI of petblocks. You can configure this command in the gui/petblocks_main_menu.yml file.

    "},{"location":"commands/#command-petblocks","title":"Command /petblocks","text":"

    Required Permission: petblocks.command

    "},{"location":"commands/#petblocks-create","title":"/petblocks create","text":"
    /petblocks create <name> <template> [player]\n

    Creates a new pet for the player with the given pet template.

    "},{"location":"commands/#petblocks-delete","title":"/petblocks delete","text":"
    /petblocks delete <name> [player]\n

    Deletes the pet of the player.

    "},{"location":"commands/#petblocks-list","title":"/petblocks list","text":"
    /petblocks list [player]\n

    Lists all pets of a player.

    "},{"location":"commands/#petblocks-call","title":"/petblocks call","text":"
    /petblocks call <name> [player]\n

    Spawns and teleports the pet in front of the owner.

    "},{"location":"commands/#petblocks-lookat","title":"/petblocks lookat","text":"
    /petblocks lookat <name> <x> <y> <z> [player]\n

    Makes the pet look at the given location.

    "},{"location":"commands/#petblocks-lookatowner","title":"/petblocks lookatowner","text":"
    /petblocks lookatowner [player]\n

    Makes the pet look at the owner.

    "},{"location":"commands/#petblocks-moveto","title":"/petblocks moveto","text":"
    /petblocks moveto <name> <x> <y> <z> <speed> [player]\n

    Makes the pet walk to a given location.

    "},{"location":"commands/#petblocks-movetoowner","title":"/petblocks movetoowner","text":"
    /petblocks movetoowner <name> <speed> [player]\n

    Makes the pet walk to the owner.

    "},{"location":"commands/#petblocks-hat","title":"/petblocks hat","text":"
    /petblocks hat <name> [player]\n

    Makes the owner wear the pet.

    "},{"location":"commands/#petblocks-ride","title":"/petblocks ride","text":"
    /petblocks ride <name> [player]\n

    Makes the owner ride the pet.

    "},{"location":"commands/#petblocks-unmount","title":"/petblocks unmount","text":"
    /petblocks unmount <name> [player]\n

    Makes the owner unmount (stop riding/hat) the pet.

    "},{"location":"commands/#petblocks-teleport","title":"/petblocks teleport","text":"
    /petblocks teleport <name> <world> <x> <y> <z> <yaw> <pitch> [player]\n

    Teleports the pet to the given location.

    "},{"location":"commands/#petblocks-velocity","title":"/petblocks velocity","text":"
    /petblocks velocity <name> <x> <y> <z> [player]\n

    Launches the pet into the given direction.

    "},{"location":"commands/#petblocks-velocityrel","title":"/petblocks velocityrel","text":"
    /petblocks velocityrel <name> <mx> <my> <mz> [oy] [player]\n

    Launches the pet into the current looking direction with the given multipliers.

    "},{"location":"commands/#petblocks-skintype","title":"/petblocks skintype","text":"
    /petblocks skintype <name> <material> [durability] [player]\"\n

    Changes the material used as a head.

    "},{"location":"commands/#petblocks-skinnbt","title":"/petblocks skinnbt","text":"
    /petblocks skinnbt <name> <nbt> [player]\n

    Changes the NBT tags of the head item.

    Works in Minecraft versions below 1.20.5. Use the /petblocks skincomponent command for Minecraft >= 1.20.5.

    "},{"location":"commands/#petblocks-skincomponent","title":"/petblocks skincomponent","text":"
    /petblocks skincomponent <name> <datacomponent> [player]\n

    Changes the Data Component tags of the head item. Data Components replace NBT tags since the release of Minecraft 1.20.5.

    See https://minecraft.wiki/w/Data_component_format for details. Use the /petblocks skinnbt command for Minecraft server below 1.20.5.

    "},{"location":"commands/#petblocks-skinbase64","title":"/petblocks skinbase64","text":"
    /petblocks skinbase64 <name> <skin> [player]\n

    Changes the head material to player_head and sets the base64 encoded texture url.

    "},{"location":"commands/#petblocks-skinheaddatabase","title":"/petblocks skinheaddatabase","text":"
    /petblocks skinheaddatabase <name> <hdbId> [player]\n

    Changes the head material to player_head and sets the texture url from a skin loaded by the HeadDatabase plugin.

    "},{"location":"commands/#petblocks-rename","title":"/petblocks rename","text":"
    /petblocks rename <name> <displayname> [player]\n

    Changes the display name of the pet. Does not accept spaces. Underlines '_' are automatically replaced by spaces. Allows values should be set in the config.yml.

    "},{"location":"commands/#petblocks-visibility","title":"/petblocks visibility","text":"
    /petblocks visibility <name> <type> [player]\n

    Changes who can see the pet.

    "},{"location":"commands/#petblocks-loop","title":"/petblocks loop","text":"
    /petblocks loop <name> <loop> [player]\n

    Changes which loop from the template is being executed by the pet. Example loops are idle.

    "},{"location":"commands/#petblocks-template","title":"/petblocks template","text":"
    /petblocks template <name> <template> [player]\n

    Changes the template of a pet without recreating the pet.

    "},{"location":"commands/#petblocks-spawn","title":"/petblocks spawn","text":"
    /petblocks spawn <name> [player]\n

    Spawns the pet if it has not already spawned.

    "},{"location":"commands/#petblocks-despawn","title":"/petblocks despawn","text":"
    /petblocks despawn <name> [player]\n

    Despawns the pet if it has not already despawned.

    "},{"location":"commands/#petblocks-toggle","title":"/petblocks toggle","text":"
    /petblocks toggle <name> [player]\n

    Toggles the pet spawn state.

    "},{"location":"commands/#petblocks-select","title":"/petblocks select","text":"
    /petblocks select <name> [player]\n

    Makes the owner select one of his pets as primary pet. This is only helpful if a single player has got multiple pets in PetBlocks-Premium.

    "},{"location":"commands/#petblocks-openheaddatabase","title":"/petblocks openheaddatabase","text":"
    /petblocks openheaddatabase <name> [player]\n

    Opens the headDatabase inventory with a special hook, which applies the next item you select in the headdatabse gui to the pet.

    "},{"location":"commands/#petblocks-breakblock","title":"/petblocks breakblock","text":"
    /petblocks breakblock <name> <timeToBreak> <dropType> [player]\n

    Breaks the block the pet is looking at. There is a placeholder, which contains the name of the block type. This command only works on blocks, if the player executing the command has got the permission to break this specific block. The command is cancel able using the cancel command. Breaking a block is automatically cancelled on certain actions. e.g. a pet looks at a player, a pet starts moving

    "},{"location":"commands/#petblocks-cancel","title":"/petblocks cancel","text":"
    /petblocks cancel <name> [player]\n

    Cancels any long running actions like breaking a block.

    "},{"location":"commands/#petblocks-snap","title":"/petblocks snap","text":"
    /petblocks snap <name> [player]\n

    Rotates the pet to the exact line of the nearest x or z axe.

    "},{"location":"commands/#petblocks-moveforward","title":"/petblocks moveforward","text":"
    /petblocks moveforward <name> <speed> [player]\n

    Lets the pet move forward in its current direction. Executing the snap command before executing this is helpful to move in a straight direction. If the pet reaches a cliff (1 block difference), moving forward stops.

    "},{"location":"commands/#petblocks-rotaterel","title":"/petblocks rotaterel","text":"
    /petblocks rotaterel <name> <direction> <angle> [player]\n

    Rotates the pet relative to its current rotation.

    "},{"location":"commands/#petblocks-entitytype","title":"/petblocks entitytype","text":"
    /petblocks entitytype <name> <entityType> [player]\n

    Changes the entity type of the pet. The default type is minecraft:armor_stand

    "},{"location":"commands/#petblocks-entityvisible","title":"/petblocks entityvisible","text":"
    /petblocks entityvisible <name> <true/false> [player]\n

    Changes if the body of an entity is visible. For armorstands this is false, for most of the other entities this should be true.

    "},{"location":"commands/#petblocks-groundoffset","title":"/petblocks groundoffset","text":"
    /petblocks groundoffset <name> <offset> [player]\n

    Changes the offset of the body of the entity to the ground. Useful when configuring different entity types.

    "},{"location":"commands/#petblocks-variable","title":"/petblocks variable","text":"
    /petblocks variable <name> <key> <value> [player]\n

    Sets the value of the variable with the given key. This is useful store arbitrary data into the pet. e.g. health, selected particle, selected sound, etc.

    "},{"location":"commands/#command-petblocksgui","title":"Command /petblocksgui","text":"

    Required Permission: petblocks.command

    "},{"location":"commands/#petblocksgui-open","title":"/petblocksgui open","text":"
    /petblocksgui open <name> [arguments.../player]\n

    Starts a new GUI session and opens the GUI with the given name for the executing player. If any other GUIs were open when executing this command, they get discarded from the navigation history.

    Samples:

    /petblocksgui open simple_sample_menu\n
    /petblocksgui open simple_sample_menu / Pikachu\n
    /petblocksgui open simple_sample_menu 123456\n
    /petblocksgui open simple_sample_menu 123456 abcde / Pikachu\n
    "},{"location":"commands/#petblocksgui-next","title":"/petblocksgui next","text":"
    /petblocksgui next <name> [arguments.../player]\n

    Reuses the existing GUI session (or starts a new one if it is not available) and opens the GUI with the given name for the executing player. If any other GUIs were open when executing this command, they get put into the navigation history. Executing /petblocksgui back reopens the previous GUI.

    "},{"location":"commands/#petblocksgui-back","title":"/petblocksgui back","text":"
    /petblocksgui back [player]\n

    Checks if the current GUI session contains a previously opened GUI. If that is the case, the previous GUI is opened and the current GUI is discarded. If not GUI is found, the current GUI is simply closed.

    "},{"location":"commands/#petblocksgui-close","title":"/petblocksgui close","text":"
    /petblocksgui close [player]\n

    Closes the current GUI and clears the GUI session and navigation history.

    "},{"location":"custommodels/","title":"Custom Models","text":"

    PetBlocks can be used to build custom pets with custom models. A bee model is shown below.

    "},{"location":"custommodels/#tutorial","title":"Tutorial","text":"

    Important

    There are even more ways to achieve custom model pets in modern Minecraft versions. This is only one way to do it.

    A pet in PetBlocks is an Armorstand with an item on its head. The NBT tags of this item can be freely manipulated in your pet.yml. Therefore, we can add the NBT tag called CustomModelData on the itemstack and display a custom model instead of the block item.

    The first step is to create a resource pack. A good starting point to create a resource pack with CustomModelData can be found here: https://www.planetminecraft.com/forums/communities/texturing/new-1-14-custom-item-models-tuto-578834/

    Secondly, update the NBT tags in the pet.yml file.

    nbt: '{CustomModelData:mycustommodelname}'

    "},{"location":"faq/","title":"FAQ","text":""},{"location":"faq/#can-i-use-petblocks-to-attack-enemies-eg-zombies-or-other-players","title":"Can I use PetBlocks to attack enemies (e.g. Zombies) or other players?","text":"

    Pets in PetBlocks can be programmed in the pet.yml file to perform such behaviors. You would need a PlaceHolderApi placeholder which contains the location of the entity you want to attack (will be added in a future update to PetBlocks, but there may already be plugins out there, which provide that). Then, create a new loop where the pet moves to to the entity using the /petblocks moveTo <x> <y> <z> command. Once the pet is near the entity, make it jump using /petblocks velocity <x> <y> <z> and execute command to damage the entity /damage @e[type=zombie,limit=1,sort=nearest] 20

    "},{"location":"faq/#how-can-i-use-petblocks-for-an-older-minecraft-version","title":"How can I use PetBlocks for an older Minecraft version?","text":"

    Maintaining backwards compatibility is very hard and actively discouraged by spigot. I do my best to add more and more workarounds. However, it has become so much work, that you can only download them by becoming a Patreon https://www.patreon.com/Shynixn.

    "},{"location":"gui/","title":"GUI","text":"

    PetBlocks comes with a powerful embedded GUI plugin, which supports Minecraft 1.8.9 - Latest.

    The default PetBlocks GUI can be opened with the command /petblock. Make sure you have all the required permissions for all GUI pages.

    "},{"location":"gui/#creating-your-own-gui","title":"Creating your own GUI","text":"

    The easiest way to get started is by editing the existing PetBlocks GUI and observing the changes.

    The workflow is like that:

    "},{"location":"gui/#starting-from-scratch","title":"Starting from Scratch","text":"
    1. Copy the simple_sample_menu.yml and rename it to my_first_menu.yml.
    2. Open the my_first_menu.yml in an editor like VSCode or NotePad++
    3. At the top of the file change the unique identifier of the GUI to
    name: \"my_first_menu\"\n
    1. Join your server and execute the following command. This command should always be executed after you have made changes in your .yml files.
    /petblocks reload\n
    1. Execute the following command to open your GUI.
    /petblocksgui open my_first_menu\n
    1. The GUI should now open for you. If it does not, check your console log for yaml file parsing errors. Correct your my_first_menu.yml or start over by deleting it.
    "},{"location":"gui/#attaching-a-custom-command-to-your-menu","title":"Attaching a custom command to your menu","text":"
    1. Let's assume you want to open the GUI with the command /mycoolgui.
    2. Edit the command section in your my_first_menu.yml to your needs.
    command: \"mycoolgui\"\n
    "},{"location":"gui/#customizing-the-gui-menu","title":"Customizing the GUI menu","text":"
    1. There are many different ways to customize the GUI. Like displaying the items, executing certain commands and hiding/showing items on certain conditions.
    2. Please take a look into the simple_sample_menu.yml file again. Each available options is explained with a short comments.
    3. If the comment mentiones Required. You need to set this property. If it says Optional you do not need to set it.
    4. As an easy test, locate the minecraft:gold_block in your my_first_menu.yml and replace it with minecraft:diamond_block. After you gave done that simply execute /petblocks reload again and open the GUI /mycoolgui.
    "},{"location":"permission/","title":"Permission","text":"

    The following permissions are available in PetBlocks.

    "},{"location":"permission/#levels","title":"Levels","text":""},{"location":"permission/#minimum-required-permissions","title":"Minimum Required Permissions","text":"Permission Level Description petblocks.command User Allows to use the /petblocks command. petblocks.pet.spawn User Required permission to see the pet. If you remove this permission from a player, the pet automatically despawns. petblocks.pet.amount.1 User The slot where the pet is stored. 1 is the default slot."},{"location":"permission/#all-permissions","title":"All Permissions","text":"Permission Level Description petblocks.command User Allows to use the /petblocks command. petblocks.pet.spawn User Required permission to see the pet. If you remove this permission from a player, the pet automatically despawns. petblocks.pet.amount.1 User The slot where the pet is stored. 1 is the default slot. petblocks.pet.amount.[number] User The slot where the pet is stored. e.g. petblocks.pet.amount.1 (slot 1) and petblocks.pet.amount.2 (slot 2) petblocks.gui.petblocks_main_menu User Allows to access the main GUI of PetBlocks. petblocks.gui.petblocks_skins_menu User Allows to access the skins GUI of PetBlocks. petblocks.gui.petblocks_skins_blockskins_menu User Allows to access the block skins GUI of PetBlocks. petblocks.gui.petblocks_skins_petskins_menu User Allows to access the pet skins GUI of PetBlocks. petblocks.gui.petblocks_skins_vehicleskins_menu User Allows to access the vehicle skins GUI of PetBlocks. petblocks.gui.petblocks_skins_plushieskins_menu User Allows to access the vehicle skins GUI of PetBlocks. petblocks.gui.[gui-name] User Allows to access a specific gui. petblocks.pet.select User Allows to mark a pet as selected. Important for GUI petblocks.help User Allows to see the help messages. petblocks.pet.call User Allows to call the pet to the owner. petblocks.pet.ride User Allows to ride a pet. petblocks.pet.hat User Allows to wear the pet like a hat petblocks.pet.unmount User Allows stop riding or stop wearing at pet petblocks.pet.list User Allows to list the pets of a player petblocks.pet.displayName User Allows to rename a pet. petblocks.pet.toggle User Allows to toggle a pet. petblocks.pet.despawn User Allows to despawn at pet. petblocks.pet.create Admin/User Allows to create a new pet. This command should probably be executed by a GUI / Sign / Server Management Plugin. If you set receivePetsOnJoin in the config.yml, you do not need this permission. petblocks.pet.delete Admin/User Allows to delete a pet. It depends on the type of server if you want to give this permission to your players. This command should be executed by a GUI / Sign / Server Management Plugin. petblocks.pet.skin Admin/User Allows to change the skin via command. This command should probably be executed by a GUI / Sign / Server Management Plugin. petblocks.pet.skin.headDataBase Admin/User Allows to change the skin via the HeadDatabase plugin. This command should probably be executed by a GUI / Sign / Server Management Plugin. petblocks.pet.lookat Admin/User Allows to force the pet to look at a given location petblocks.pet.lookatOwner Admin/User Allows to force the pet to look at the owner petblocks.pet.moveto Admin/User Allows to force the pet to move to a given location petblocks.pet.movetoOwner Admin/User Allows to force the pet to move to the owner petblocks.pet.teleport Admin/User Allows to force the pet to teleport to a given location petblocks.pet.velocity Admin/User Allows to force the pet to fly to a given direction petblocks.pet.velocityRel Admin/User Allows to force the pet to fly to a given direction petblocks.pet.visibility Admin/User Allows to change the pet visibility. petblocks.pet.loop Admin/User Allows to change the pet loop. A loop is discussed further in the pet customization section. petblocks.pet.loop Admin/User Allows to change the pet loop. A loop is discussed further in the pet customization section. petblocks.pet.setTemplate Admin/User Allows to change the template of a pet. petblocks.pet.select Admin/User Allows to mark a pet as selected. This is helpful for placeholders. petblocks.pet.openHeadDatabase Admin/User Allows to open the headDatabase menu using PetBlocks. petblocks.pet.template.[name] Admin/User If you give your players access to petblocks.pet.create, each individual template is still locked by this permission. petblocks.pet.breakBlock Admin/User Allows to use the /petblocks breakblock command petblocks.pet.cancel Admin/User Allows to use the /petblocks cancel command petblocks.pet.snap Admin/User Allows to use the /petblocks snap command petblocks.pet.moveRel Admin/User Allows to use the /petblocks moveforward command petblocks.pet.rotateRel Admin/User Allows to use the /petblocks rotaterel command petblocks.pet.entityType Admin/User Allows to use the /petblocks entitytype command petblocks.pet.entityVisibility Admin/User Allows to use the /petblocks entityvisible command petblocks.pet.groundOffset Admin/User Allows to use the /petblocks groundOffset command petblocks.pet.variable Admin Allows to use the /petblocks variable command petblocks.pet.manipulateOther Admin Allows to manipulate the pets of other players. e.g. Changing skins, etc. petblocks.reload Admin Permission to use the /petblocks reload command."},{"location":"placeholders/","title":"PlaceHolders","text":"

    The following placeholders are available in PetBlocks and can also be used via PlaceHolderApi.

    PlaceHolder Api

    As PetBlocks supports multiple pets per player, you need to select the pet in your placeholders. You can do this by appending the pet slot _1 _2 etc. or use the /petblocks select <name> command to set a pet as selected which can be retrieved using _selected. This results into placeholders such as e.g. %petblocks_pet_displayName_1% or %petblocks_pet_displayName_selected%. This is only relevant in external plugins. For actions in PetBlocks, you can directly use the placeholders below.

    Player PlaceHolders Description %petblocks_owner_name% Player name of the owner of a pet. %petblocks_owner_displayName% Player displayName of the owner of a pet. %petblocks_owner_locationWorld% Name of the world the owner of a pet is inside. %petblocks_owner_locationX% X coordinate of the owner of a pet. %petblocks_owner_locationY% Y coordinate of the owner of a pet. %petblocks_owner_locationZ% Z coordinate of the owner of a pet. %petblocks_owner_locationYaw% Yaw rotation of the owner of a pet. %petblocks_owner_locationPitch% Yaw rotation of the owner of a pet. %petblocks_owner_itemMainHand_type% Name of the item type in the owner's main hand %petblocks_owner_isFlying% True if the owner is currently flying, false if not. Pet PlaceHolders Description %petblocks_pet_name% Id of a pet %petblocks_pet_displayName% Displayname of a pet %petblocks_pet_distanceToOwner% Distance from the pet to the owner. If the owner is in another world, this value becomes very high. %petblocks_pet_isSpawned% True if the pet is spawned, false if not. %petblocks_pet_template% Name of the template a pet uses. %petblocks_pet_visibility% Visibility Type a pet uses. %petblocks_pet_isMounted% True if the owner rides the pet or uses it as a hat. %petblocks_pet_loop% Name of the loop a pet currently executes. %petblocks_pet_locationWorld% Name of the world the pet is inside. %petblocks_pet_locationX% X coordinate of the pet. %petblocks_pet_locationY% Y coordinate of the pet. %petblocks_pet_locationZ% Z coordinate of the pet. %petblocks_pet_locationYaw% Yaw rotation of the pet. %petblocks_pet_locationPitch% Yaw rotation of the pet. %petblocks_pet_itemType% The head item type of the pet. %petblocks_pet_itemNbt% The head item NBT of the pet. < 1.20.5 %petblocks_pet_itemComponent% The head item data component of the pet. >= 1.20.5 %petblocks_pet_itemHeadBase64% The head item Base64 Skin Url of the pet. %petblocks_pet_isBreakingBlock% True if the pet is currently breaking a block, false if not. %petblocks_pet_blockInFrontType% Name of the block type the pet is looking at Event Player PlaceHolders Description %petblocks_eventPlayer_name% Player name of the event trigger player. %petblocks_eventPlayer_displayName% Player displayName of the event trigger player. %petblocks_eventPlayer_locationWorld% Name of the world event trigger player of a pet is inside. %petblocks_eventPlayer_locationX% X coordinate of the event trigger player. %petblocks_eventPlayer_locationY% Y coordinate of the event trigger player. %petblocks_eventPlayer_locationZ% Z coordinate of the event trigger player. %petblocks_eventPlayer_locationYaw% Yaw rotation of the event trigger player. %petblocks_eventPlayer_locationPitch% Yaw rotation of the event trigger player. %petblocks_eventPlayer_itemMainHand_type% Name of the item type in the players's main hand %petblocks_eventPlayer_isFlying% True if the player is currently flying, false if not. GUI PlaceHolders Description %petblocks_player_name% Player name of the player clicking in the current inventory. %petblocks_player_displayName% Player displayName of the player session in the current inventory. %petblocks_gui_name% Name of the current inventory. %petblocks_gui_backName% Name of the previous inventory (if you have multiple sub pages) %petblocks_gui_param1% A GUI can have up to 9 parameters. This placeholders access number 1. %petblocks_gui_param2% A GUI can have up to 9 parameters. This placeholders access number 2. %petblocks_gui_param3% A GUI can have up to 9 parameters. This placeholders access number 3. %petblocks_gui_param4% A GUI can have up to 9 parameters. This placeholders access number 4. %petblocks_gui_param5% A GUI can have up to 9 parameters. This placeholders access number 5. %petblocks_gui_param6% A GUI can have up to 9 parameters. This placeholders access number 6. %petblocks_gui_param7% A GUI can have up to 9 parameters. This placeholders access number 7. %petblocks_gui_param8% A GUI can have up to 9 parameters. This placeholders access number 8. %petblocks_gui_param9% A GUI can have up to 9 parameters. This placeholders access number 9."},{"location":"receivingpets/","title":"Giving Pets to Players","text":"

    Once you have setup the permission, join your server. The PetBlocks default configuration creates a pet with template classic for you and makes it spawn in front of you. If you cannot see the pet, try executing /petblocks call pet or review your permissions again.

    Make sure your players have this permission to see their pet:

    petblocks.pet.spawn\npetblocks.pet.amount.1   \n

    The next step is to decide, how you want your players to receive a pet. There are multiple options below.

    "},{"location":"receivingpets/#receiving-a-pet-on-first-join","title":"Receiving a pet on first join","text":"

    This is enabled per default and can be changed in the config.yml under pet/receivePetsOnJoin. This creates a new database entry for each joining player, regardless if he has the spawn permission or not. The player requires the minimum petblocks.pet.spawn to see their pet.

    If you want to receive no pets on join and unlock pets later own (e.g. for shops or VIP perks), change this to:

    pet:\n  receivePetsOnJoin: []\n

    If you want to receive multiple pets (PetBlocks-Premium only) on first join. Append other pets below it. They have to have different names.

    pet:\n  receivePetsOnJoin:\n    - name: \"pet1\"\n      template: \"classic\"\n    - name: \"pet2\"\n      template: \"classic\"      \n

    In order to configure, if the pet should automatically spawn in front of the player on creation, open the template plugins/PetBlocks/pets/pet_classic.yml. Set pet/spawned to true or false.

    "},{"location":"receivingpets/#receiving-pets-using-a-shop","title":"Receiving pets using a shop","text":"

    There are many ways how you can handle it. These are just examples below:

    "},{"location":"receivingpets/#option-1-just-selling-skins-for-your-pet-easy","title":"Option 1 - Just selling skins for your pet (easy)","text":"
    1. Build a shop GUI
    2. Keep the receive pet on join settings, the player should receive a pet everytime.
    3. Invent a new permission for each pet you would like to sell like petblocks.pettype.<yourpettype> e.g. petblocks.pettype.pikachu.
    4. Once a player buys the item in your shop, give them your newly invented permission e.g. petblocks.pettype.pikachu
    5. Show an item in your GUI to change the skin to pikachu only, if the player has got the newly invented permission e.g. petblocks.pettype.pikachu
    6. Execute the command with server level permission:
    /petblocks skinbase64 pet eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTdlYmNlZjQ2ODNjZGI3MTYzZTk2OWU0ZTIyNjlmMzY3M2E1ZDVlNmI3OGUwNmZhZWU0NWJjZjdjNDljMzk3In19fQ== %petblocks_owner_name%\n
    "},{"location":"receivingpets/#option-2-state-handling-of-pets-hard","title":"Option 2 - State handling of pets (hard)","text":"
    1. Build a shop GUI
    2. Disable receive pet on join like shown above
    3. Invent a new permission for each pet you would like to sell like petblocks.pettype.<yourpettype> e.g. petblocks.pettype.pikachu.
    4. Once a player buys the item in your shop, give them your new invented permission e.g. petblocks.pettype.pikachu
    5. Build a pet management GUI
    6. Create a new item which is only visible if the player has obtained the e.g. petblocks.pettype.pikachu permission.
    7. When the player clicks on that item, execute the following command with server level permission:
    /petblocks create <petName> <templateName> %petblocks_owner_name%\n

    Executing the create command multiple times is fine, it does not do anything if the pet already exists.

    "},{"location":"receivingpets/#option-3-free-creationdeletion-of-pets-for-players-easy","title":"Option 3 - Free creation/deletion of pets for players (easy)","text":"
    1. Give your players the permission to the following
    petblocks.pet.create\npetblocks.pet.delete\npetblocks.pet.amount.1\n
    1. Disable receive pet on join like shown above
    2. Build a shop GUI
    3. Once a player buys the item in your shop, give them the permission to the petblocks template e.g. petblocks.pet.template.classic.
    4. Let the player freely execute /petblocks create <petName> classic and /petblocks delete <petName> . You can also setup this in a GUI.
    "},{"location":"template/","title":"Template","text":"

    PetBlocks allows you to create templates, how a pet is going to look like and how it is going to behave. You can fully customize the behaviour and program the pets to perform certain actions.

    PetBlocks provides you with a starting pet template called classic, which can be found in the plugins/PetBlocks/pets/ folder. You can copy this template and start desigining your own pets. Make sure to give it a new unique template identifier.

    Modify a template and execute /petblocks reload to apply the changes to your pet.

    "},{"location":"template/#static-values","title":"Static Values","text":"

    Most of the static values are explained in the config file itself. Set them according to your needs.

    Example for static values are name, version and all initial pet settings under pet:.

    "},{"location":"template/#events","title":"Events","text":"

    Events define what actions to execute on certain events.

    The following events are supported:

    For example the leftClick event gets executed when a player left-clicks on the pet. However, it may not be the owner, who clicks on a pet, therefore you need to check if the player is the owner first as a condition.

    Example:

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"Open the pet GUI\" \n        condition:\n          type: STRING_EQUALS\n          left: \"%petblocks_eventPlayer_name%\"\n          right: \"%petblocks_owner_name%\"\n        type: \"COMMAND\"\n        level: \"PLAYER\"\n        run:\n          - \"/petblocks select %petblocks_pet_name%\"\n          - \"/petblock\"\n

    If you want to execute nothing when the player rightClicks on the pet, remove all actions.

    events:\n  rightClick:\n    actions: []\n
    "},{"location":"template/#building-a-new-action","title":"Building a new action","text":"

    PlaceHolders

    You can use placeholders almost anywhere when building actions. You can even use PlaceHolderApi based placeholders.

    Create a new action and give it an arbitrary name.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n

    Select the action type. Support actions are COMMAND, DELAY, JAVASCRIPT.

    "},{"location":"template/#command","title":"COMMAND","text":"

    Executes one or multiple commands as Console or Player.

    Vanilla Commands

    A vanilla command may automatically log to the console and to the chat of every op player. You can disable the output for op players using vanilla game rules such as /gamerule sendCommandFeedback false, /gamerule logAdminCommands false, /gamerule commandBlockOutput false. If you want to hide the output in your console (not recommend), you need to install a LogFilter plugin.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n
    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    "},{"location":"template/#delay","title":"DELAY","text":"

    Delays the next action for a certain amount of ticks.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"Delay Action\" # Required arbitrary name.\n        type: \"DELAY\" # Required action type.\n        ticks: 60 # Required for type DELAY. 60 Ticks delay.\n
    "},{"location":"template/#javascript","title":"JAVASCRIPT","text":"

    Executes JavaScript based Code for value calculation

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"JavaScript action\" # Required arbitrary name.\n        type: \"JAVASCRIPT\" # Required action type.\n        initial: \"Cool\" # Required for type JAVASCRIPT. The initial value of the result variable.\n        variable: \"myVariable\" # Required for type JAVASCRIPT. The name of the result variable, which can be read using PlaceHolders.\n        js: |                  # Required for type JAVASCRIPT. Actual multi line JavaScript code.\n          function createText() {\n             var text = \"%petblocks_js_myVariable%\" + \" Plugin\"\n             return text\n          }\n          createText();\n
    "},{"location":"template/#debugging-actions","title":"Debugging Actions","text":"

    When you start creating actions, it is very helpful to know, which action is currently being executed and how variables are evaluated. Every action can be logged to your server console by setting the optional debug: true property of an action.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"Delay Action\" # Required arbitrary name.\n        type: \"DELAY\" # Required action type.\n        ticks: 60 # Required for type DELAY. 60 Ticks delay.\n        debug: true # Optional flag to log this action to the console.\n
    "},{"location":"template/#restricting-actions","title":"Restricting Actions","text":""},{"location":"template/#permission","title":"Permission","text":"

    Actions can optionally have the permission tag:

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        permission: \"mycustom.permission\"\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    "},{"location":"template/#conditions","title":"Conditions","text":"

    Actions can optionally have conditions, which support the following types:

    Try to avoid using JAVASCRIPT because it requires more computation time. It should only be used if you want to create complex boolean expressions.

    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        condition: # Optional condition tag.\n          type: STRING_EQUALS # Required condition type.\n          left: \"%petblocks_eventPlayer_name%\" \n          right: \"%petblocks_owner_name%\"\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    events:\n  rightClick:\n    actions:  # You can add/remove actions as you want here.\n      - name: \"My new action\" # Required arbitrary name.\n        condition: # Optional condition tag.\n          type: JAVASCRIPT # Required condition type.\n          js: \"Math.floor(Math.random() * 100) <= 50\" # 50% chance to execute this command.\n        type: \"COMMAND\" # Required action type.\n        level: \"SERVER\" # Required for type COMMAND. Possible values are PLAYER (player level permission), SERVER (console level permission)\n        run: \n          - \"/say Hello %petblocks_owner_name%\" # Required for type COMMAND. One or more commands are allowed.\n
    "},{"location":"template/#loops","title":"Loops","text":"

    Loops define, what the pet should repeatedly do. You can customize and define your own loops using actions.

    Programmable Pets

    You can freely build new loops, delete loops and customize the behavior of pets. The actions allow full freedom to design your pets.

    "},{"location":"template/#idle-loop","title":"Idle Loop","text":"

    The idle loop explained:

    1. Delay Action
      1. We wait for 20 ticks.
    2. Look at owner with a 90% change.
      1. The JavaScript condition is evaluated, which returns true 90% of the time
      2. The console executes the command /petblocks lookatowner %petblocks_pet_name% %petblocks_owner_name%
    3. Switch to moveToOwner if pet is too far away
      1. The JavaScript condition is evaluated, if the distance of the pet to the owner is bigger than 7 blocks.
      2. If true, the console executes the command /petblocks loop %petblocks_pet_name% moveToOwner %petblocks_owner_name% , which switches the loop idle to the loop called moveToOwner.
      3. If false, this loop continous and starts again from the top with Delay Action
    loops:\n  idle: \n    actions:\n      - name: \"Delay Action\"\n        type: \"DELAY\"\n        ticks: 20\n      - name: \"Look at owner with a 90% change.\"\n        condition:\n          type: JAVASCRIPT\n          js: \"Math.floor(Math.random() * 100) <= 90\" # Calculate chance in JavaScript.\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks lookatowner %petblocks_pet_name% %petblocks_owner_name%\"\n      - name: \"Switch to moveToOwner if pet is too far away\"\n        condition:\n          type: JAVASCRIPT\n          js: \"%petblocks_pet_distanceToOwner% > 7\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks loop %petblocks_pet_name% moveToOwner %petblocks_owner_name%\"\n
    "},{"location":"template/#movetoowner-loop","title":"MoveToOwner Loop","text":"

    As we noticed that the loop changes to the loop moveToOwner, we take a look at this loop too.

    1. Recalculate path and start moving to owner.
      1. The console executes the command /petblocks moveToOwner %petblocks_pet_name% 0.2 %petblocks_owner_name%
    2. Switch to idle if the pet is beside the player
      1. The JavaScript condition is evaluated, if the distance of the pet to the owner is smaller than 4 blocks.
      2. If true, the console executes the command /petblocks loop %petblocks_pet_name% moveToOwner %petblocks_owner_name% , which switches the loop moveToOwner to the loop called idle.
      3. If false, the next action is executed.
    3. Teleport pet to player if the pet is too far away for the pathfinder.
      1. The JavaScript condition is evaluated, if the distance of the pet to the owner is bigger than 20 blocks.
      2. If true, the command is executed to teleport the pet to the owner location.
      3. If false, the next action is executed.
    4. Delay Action
      1. We wait for 20 ticks.
      2. The loop continous and starts again from the top with Recalculate path and start moving to owner
    loops:\n  moveToOwner:\n    actions:\n      - name: \"Recalculate path and start moving to owner.\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks moveToOwner %petblocks_pet_name% 0.2 %petblocks_owner_name%\"\n      - name: \"Switch to idle if the pet is beside the player\"\n        condition:\n          type: JAVASCRIPT\n          js: \"%petblocks_pet_distanceToOwner% < 4\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks loop %petblocks_pet_name% idle %petblocks_owner_name%\"\n      - name: \"Teleport pet to player if the pet is too far away for the pathfinder.\"\n        condition:\n          type: JAVASCRIPT\n          js: \"%petblocks_pet_distanceToOwner% > 20\"\n        type: \"COMMAND\"\n        level: \"SERVER\"\n        run:\n          - \"/petblocks teleport %petblocks_pet_name% %petblocks_owner_locationWorld% %petblocks_owner_locationX% %petblocks_owner_locationY% %petblocks_owner_locationZ% %petblocks_owner_locationYaw% %petblocks_owner_locationPitch% %petblocks_owner_name%\"\n      - name: \"Delay Action\"\n        type: \"DELAY\"\n        ticks: 20\n
    "}]} \ No newline at end of file diff --git a/docs/wiki/site/sitemap.xml.gz b/docs/wiki/site/sitemap.xml.gz index 82a04c4b1..bde1c4a66 100644 Binary files a/docs/wiki/site/sitemap.xml.gz and b/docs/wiki/site/sitemap.xml.gz differ