Commands - Zedd7/ZHorse GitHub Wiki

Command list

The main ZHorse command is /zhorse, for which the alias /zh is provided.
You can create your own alias for all ZHorse commands by using the file commands.yml provided by Bukkit (see related tutorial).

Legend : /zhorse <command> <mandatory parameters> [optional parameters]

Command Parameter Description Permission Console
/zh admin <sub-command> <value1> [value2] Manage ZHorse files zh.admin.* No
/zh buy [horse name] Buy the horse zh.buy No
/zh claim [horse name] Claim the horse and give it a name zh.claim No
/zh edit [health] [speed] [...] Edit statistics of the horse zh.edit No
/zh free Release the horse zh.free No
/zh friend <sub-command> [player] Manage your friends zh.friend.* No
/zh give [‑p] <player> Give the horse to another player zh.give No
/zh heal Heal the horse zh.heal No
/zh help [#page | command name] Display the available commands zh.help Yes
/zh here Teleport the horse to you zh.here No
/zh info Display informations about the horse zh.info No
/zh kill Kill the horse zh.kill No
/zh list [#page] Display the list of claimed horses zh.list No
/zh lock Protect the horse against theft zh.lock No
/zh protect Prevent the horse from being hurt zh.protect No
/zh reload Reload all ZHorse's files zh.reload Yes
/zh rename [horse name] Rename the horse zh.rename No
/zh rez [horse name] Resurrect the most recently dead horse zh.rez No
/zh sell [price] Put the horse up for sale zh.sell No
/zh settings <option> <value> Ajust personal settings zh.settings.* No
/zh share Share the horse with other players zh.share No
/zh spawn [[-v] variant] [health] [speed] [...] Spawn a custom horse zh.spawn No
/zh stable <sub-command> Manage the horse's stable zh.stable No
/zh tame Tame the horse zh.tame No
/zh tp Teleport you to the horse zh.tp No

/zh admin sub-command list

Sub-command Parameter Description Permission
/zh admin burial [‑p] <player> Clear all dead horses from the database zh.admin.burial
/zh admin clear [‑p] <player> Clear a living horse from the database zh.admin.clear
/zh admin import <database> Import external data in your current database zh.admin.import

/zh friend sub-command list

Sub-command Parameter Description Permission
/zh friend add [‑p] <player> Add a player to your friends list zh.friend.add
/zh friend list Display your friends list zh.friend.list
/zh friend remove [‑p] <player> Remove a player from your friends list zh.friend.remove

/zh settings sub-command list

Sub-command Parameter Description Permission
/zh settings favorite [‑i] <horse ID> Define your favorite horse zh.settings.favorite
/zh settings language <language> Define the language of notifications zh.settings.language
/zh settings stats <display mode> Define horse stats display mode zh.settings.stats
/zh settings swap <horse ID 1> <horse ID 2> Swap two horse IDs zh.settings.swap

/zh stable sub-command list

Sub-command Parameter Description Permission
/zh stable go Teleport your Horse to your stable zh.stable.go
/zh stable set Setting the current location to as your stable location zh.stable.set
/zh stable unset Remove your defined stable zh.stable.unset

Advanced use

With command flags

If you want to use ZHorse in a deeper way, you can make use of command flags in any command, as long as you have the required permission.

Flags that require an argument (-i and -p) must be separated from their argument by a space. Thus, /zh heal -i 5 (where 5 is the horse ID) and /zh give Arod -p Z3dd7 (where Arod is the horse name and Z3dd7 the player name) are valid, but /zh heal -i5 or /zh give -p Arod Z3dd7 are not.

Flag Description Permission
‑a Enable the admin mode for the command, allowing to override most of ZHorse protections (horse ownership, claim limit, horse stats thresholds, and much more). zh.<command>.admin
‑i horse ID The command will target the player's horse whose ID correspond to the one provided in horse ID, instead of targeting the horse currently mounted by the player.
‑p player The command will target the horses of the player whose name correspond to the one provided in player, instead of the horses of the command sender.

Without command flags

If you don't understand how flags work or if don't want to use/remember them, you can just replace them with blanks or player/horse names. ZHorse will then try to automatically convert your command into a valid one in regard to command flags.

However, you cannot replace more than one flag at once (except for the -a flag), so if two flag parameters are required for a command (for example /zh give -i 5 -p Z3dd7), you must provide at least one of them (thus, /zh give Arod -p Z3dd7 and /zh give -i 5 Z3dd7 are valid but /zh give Arod Z3dd7 is not).

Flag Substitute
‑a A blank if the config option auto-admin is set to true for that command.
‑i horse ID The horse name or a blank if you are not already mounting a horse. The flag will be replaced by the corresponding horse ID.
‑p player The player name. The substitution consists only of omitting the flag -p.

Another trick is to define a favorite horse ID (1 by default) by the mean of the command /zh settings favorite and to leave the field of the horse ID/name blank (just as when you are mounting a horse) in order for it to be automatically replaced by your favorite horse ID.

Examples

Command Effect
/zh help 2 Display the second page of commands you have access to.
/zh help ‑a Display the first page of commands, including those you don't have access to. (Bypass any protection in the process)
/zh help ‑p Z3dd7 Display all commands Z3dd7 has access to.
/zh claim Claim the horse you are mounting and give it a random name.
/zh claim Arod Claim the horse you are mounting and give it the name Arod.
/zh claim ‑i 3 ‑a Claim the horse of id 3 that is already belonging to you and give it its previous name. (Bypass any protection in the process)
/zh claim ‑i 2 Pegasus ‑p Z3dd7 ‑a Claim the horse of id 2 belonging to Z3dd7 and give it the name Pegasus. (Bypass any protection in the process)
/zh give Z3dd7 Give you favorite horse (or the one you are mounting) to Z3dd7.
/zh tp ‑i 1 Teleport yourself to your horse of id 1.
/zh tp Teleport yourself to your favorite horse (or the one you are mounting).
/zh here ‑p Z3dd7 ‑a ‑i 4 Teleport the horse of id 4 belonging to Z3dd7 to yourself. (Bypass any protection in the process)
⚠️ **GitHub.com Fallback** ⚠️