# Documentation & Wikis

Here are links to Skript's documentation (usually shortened to 'docs') sites:\
(excluding the SkriptLang one as it's covered on the next page)

* [Skript Hub Documentation](https://skripthub.net/docs/)
* [skUnity Documentation](https://docs.skunity.com/)
* [Minecraft Wiki](https://minecraft.wiki/) (Not Skript-related, but goes over pretty much everything in base Minecraft, which you'll need to reference from time to time)
* [SkBee Wiki](https://github.com/ShaneBeee/SkBee/wiki) (The wiki for the SkBee addon, explaining (nearly) all of SkBee's features in-depth. Not every script will require SkBee, however it is a very versatile and powerful addon installed on most servers that use Skript. This wiki covers many of SkBee's features in-depth with loads of helpful information)
  * SkBee is now officially **DISCONTINUED**, recommended alternatives are SkImagine (currently unreleased) or SkBee-continued. As of right now (27/11/2024), the information on the SkBee wiki still applies.

***

## How to use the documentation

{% hint style="warning" %}
This example will use the Skript Hub documentation, but the concepts extend to skUnity's documentation as well.
{% endhint %}

When you first open the (Skript Hub) documentation, it should look something like this (although it may be in light mode, toggle is in the top-right corner):

<figure><img src="/files/g1bfwQGZRCjU0e8N0msB" alt=""><figcaption></figcaption></figure>

This documentation site has three main components;

* Filters (syntax types and addons)
* A search bar
* Results; syntax and examples

***

## Search bar

Right at the top of the page is the search bar, where you can input keywords to quickly find results or apply filters (because scrolling takes a long time!).

{% hint style="warning" %}
You might want to try a few different iterations or keywords to ensure you find what you're looking for. For example, searching for `"crouching"` will yield results about foxes (crouching in preparation for a jump), but nothing to do with players. For players, the correct keyword is `"sneaking"`.

Verbally, these are often interchangeable, however in code that is not the case. The action of sneaking in-game is often interchangeably referred to as sneaking, crouching, and shifting, but only one of these words is recognised on the documentation.

Another good idea is to be general. One example is the condition used to check if a player is in a bed. There is no `is asleep` condition, but there is an `is sleeping` condition. To play both sides, search for the keyword `"sleep"`.
{% endhint %}

***

## Filters

On the left side of the webpage, there will be a bar that you can use to filter for results only of a certain syntax type or from a certain plugin.

{% hint style="info" %}
You can also apply filters by typing a syntax type or addon name into the search bar.
{% endhint %}

{% tabs %}
{% tab title="Syntax types" %}
Clicking on syntax types will restrict other types from appearing as results. For example, if you search for `"sneak"`, there will be an event for when a player sneaks or unsneaks (`on sneak toggle:`), as well as a condition to see if a player is currently sneaking or not (`%player% is sneaking`). Filtering for only events or only conditions will only make one of these show, and hide the other.

{% hint style="info" %}
A syntax type describes what the result does, such as events which are used to start code, and expressions used to represent something.

To the left of each of the syntax types is a colour, which will also show up on results of that syntax type. The syntax type is also displayed after a result's title.
{% endhint %}
{% endtab %}

{% tab title="Addons" %}
In the bottom-left corner of the page is the addons filter section. Selecting addons names here will prevent results not from any selected plugins from showing up. Useful when multiple addons have results with the keywords you search for.
{% endtab %}
{% endtabs %}

***

## Information

(A sample result of a documentation page, the `on join:` event.)

<figure><img src="/files/eu5FO9JQLt9LE72j1q0S" alt=""><figcaption></figcaption></figure>

### Title & syntax type

At the very top-left corner of a result is its title or name, in this case "On join".

The colour on the left side of the result, and the text just after the title can be used to determine the syntax type (which is explained above).

### Plugin and version

On the top-right corner is the name and version of a plugin, which will tell readers what plugin (Skript or an addon) and minimum version is required for this to be useable.

### Syntax

Right under the title is the syntax pattern, which provides a usage template for readers.

{% hint style="info" %}
Not sure what syntax is or what it means? See the [Syntax page](/syntask/fundamentals/syntax.md).

Syntax basically represents how the line must be typed to be recognised as acceptable code Skript knows how to handle when parsed.
{% endhint %}

### Description

Under the syntax is a short (or sometimes lengthy) description detailing the result. Sometimes a result will require a certain server version or have limitations, these will be indicated in the description.

### Event-values

Events will (usually) list their event-values, which are expressions that can be used within that event.

### Examples

At the very bottom, there will be a drop-down that shows examples of that result in use. These can be submitted by anyone, so look at their ratings to decide if they are good examples or not.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://x8ight.gitbook.io/syntask/resources/documentation-and-wikis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
