From 0a22c2c375e79a5477fdacef0152ac71a9f83692 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 29 Nov 2020 01:40:33 +0000 Subject: [PATCH] Merge docs for '[Scarpet] Add display_title function (#555)' --- docs/scarpet/Full.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/scarpet/Full.md b/docs/scarpet/Full.md index ddc697d7..27d933c0 100644 --- a/docs/scarpet/Full.md +++ b/docs/scarpet/Full.md @@ -4514,6 +4514,18 @@ Example usages: // not a problem in apps +### `display_title(players, type, title?, fadeInTicks?, stayTicks?, fadeOutTicks),` + +Sends the player (or players if `players` is a list) a title of a specific type, with optionally some times. + * `players` is either an online player or a list of players. When sending a single player, it will throw if the player is invalid or offline. + * `type` is either `'title'`, `'subtitle'`, `actionbar` or `clear`. + Note: `subtitle` will only be displayed if there is a title being displayed (can be an empty one) + * `title` is what title to send to the player. It is required except for `clear` type. Can be a text formatted using `format()` + * `...Ticks` are the number of ticks the title will stay in that state. + If not specified, it will use current defaults (those defaults may have changed from a previous `/title times` execution). + Executing with those will set the times to the specified ones. + Note that `actionbar` type doesn't support changing times (vanilla bug, see [MC-106167](https://bugs.mojang.com/browse/MC-106167)). + ### `logger(msg), logger(type, msg)` Prints the message to system logs, and not to chat. By default prints an info, unless you specify otherwise in the `type` parameter. @@ -4738,7 +4750,7 @@ Available options in the scarpet app space: * `world_seed` - a numeric seed of the world * `world_path` - full path to the world saves folder * `world_folder` - name of the direct folder in the saves that holds world files - * `world_carpet_rules` - returns all Carpet rules in a map form (`rule`->`value`). Includes rules from extensions with their namespace (`namespace:rule`->`value`). You can later listen to rule changes with the `on_carpet_rule_change(rule, newValue)` event. + * `world_carpet_rules` - returns all Carpet rules in a map form (`rule`->`value`). Note that the values are always returned as strings, so you can't do boolean comparisons directly. Includes rules from extensions with their namespace (`namespace:rule`->`value`). You can later listen to rule changes with the `on_carpet_rule_changes(rule, newValue)` event. Relevant gameplay related properties * `game_difficulty` - current difficulty of the game: `'peacefu'`, `'easy'`, `'normal'`, or `'hard'`