# Welcome

Sheets - Unified Menus and Forms

Sheets is a powerful Bukkit plugin that allows you to create rich Java GUIs and Bedrock forms using a single configuration. It features a robust action system, dynamic placeholders, and cross-platform support.

### Key Features

* **Unified Configuration**: [Define your menus once](/advanced/configuration) and they work on both [Java and Bedrock](/advanced/platform-specific).
* **Chest Edit Mode**: [Visually edit your Java GUIs](/features/editor#1-chest-edit-mode-java-only) in-game and save changes directly to the configuration.
* **Dynamic Input**: Use [Anvil menus](/features/editor#2-anvil-input) for text input that can be passed to subsequent commands and actions.
* **Powerful Actions**: A wide range of [supported actions](/features/actions) for player and server interactions.
* **Multi-Tier Placeholders**: Global variables, local arguments, and integration with [PlaceholderAPI](/features/placeholders).
* **Automatic Converter**: Automatically detect and convert [DeluxeMenus configurations](/features/converter).
* **Menu Templates**: Quickly create new sheets using [pre-defined templates](/features/templates).


# Quickstart

### Introduction

The Sheets plugin for Minecraft Java Edition provides an extensive toolkit for creating dynamic menus and interactive forms, enhancing player engagement and overall gameplay experience. This section will guide you through the installation and basic setup of the Sheets plugin, helping you create your first menu and utilize its features effectively.

Want to learn about writing menu from scratch? Head to the [Basics](/) section to learn more.

### Installation

#### Prerequisites

Before installing the Sheets plugin, ensure you have the following:

* **Java** version 21 installed
* A **Minecraft Java Edition** server running a compatible version of [Spigot ](#user-content-fn-1)\[^1]1.21+.
* [**Geyser**](https://geysermc.org/download/) installed (optional) if you plan to support cross-play with Bedrock Edition players.
* [**PlaceholderAPI**](https://www.spigotmc.org/resources/placeholderapi.6245/) installed (optional) if you want to use placeholders
* [**Vault**](https://www.spigotmc.org/resources/vault.34315/) and an economy plugin installed (optional) if you want to use economy

#### Installation Steps

* **Download the Plugin**
  * Go to the [BuiltByBit resource page](https://builtbybit.com/resources/sheets-unified-menus-forms-for-java.51876/) and download the latest version of the Sheets plugin.
* **Add the Plugin to Your Server**
  * Move the downloaded `.jar` file into the `plugins` folder of your Minecraft server directory.
* **Restart Your Server**
  * Restart your server to enable the plugin. Check the server console for messages confirming that Sheets has been loaded successfully.

If you encounter any problem installing the plugin you can request support at [our discord](https://discord.bed.codes)

### Basic Configuration

Sheets doesn't require any configuration to work directly after installing. The only option in the configuration right now is debug.

You can add or configure menus in the `plugins/Sheets/menus/` folder. You don't need to add the menu to a configuration; every file in the `menus` folder is loaded, no matter if it's in another folder inside like `plugins/Sheets/menus/anotherfolder/`.

### Creating Your First Menu

There are two ways to create a menu: using a command or manually creating a YAML file.

#### Using Commands

Run the following command to create a new sheet using the default template:

```bash
/sheets create my_first_menu basic_gui
```

This will create a new file at `plugins/Sheets/menus/my_first_menu.yml` and open it for you.

#### Manual Creation

1. Navigate to `plugins/Sheets/menus/`.
2. Create a new file named `hello_world.yml`.
3. Paste the following content:

```yaml
name: hello_world
title: "Hello World!"
type: normal
size: 27
buttons:
  - slot: 13
    material: DIAMOND
    name: "&bWelcome to Sheets!"
    lore:
      - "&7Click me to receive a message"
    actions:
      - message: "&aYou clicked the diamond!"
```

4. Save the file and run `/sheets reload`.
5. Open your menu with `/sheets open hello_world`.

### Next Steps

* Learn about more [Commands](/getting-started/commands) to manage your menus.
* Explore [Actions](/features/actions) to add functionality to your buttons.
* Check out the [Configuration](/advanced/configuration) to customize the plugin.
* Learn how to use [Requirements](/features/requirements) for button visibility.
* Use [Placeholders](/features/placeholders) to create dynamic content.


# Commands

Manage your sheets and the plugin using the following commands.

### General Commands

* `/sheets open <menu>`: Opens the specified menu for the player.
* `/sheets reload`: Reloads all plugin configurations and menus.
* `/sheets reload <menu>`: Reloads only the specified menu.
* `/sheets list [page]`: Displays a paginated list of all loaded menus.
* `/sheets info <menu>`: Shows detailed information about a specific menu.

### Management Commands

* `/sheets create [name] [template]`:
  * `/sheets create`: Opens the graphical template selector.
  * `/sheets create <name> [template]`: Creates a new sheet. If a [template](/features/templates) is specified, it will be used as the base.
* `/sheets edit [name] [chest]`:
  * `/sheets edit`: Opens the [graphical edit menu](/features/editor) to manage all sheets.
  * `/sheets edit <name>`: Opens the edit menu for the specified sheet.
  * `/sheets edit <name> chest`: Opens the visual [chest editor](/features/editor#1-chest-edit-mode-java-only) for the specified sheet.
* `/sheets delete <name> [confirm]`: Deletes the specified sheet. Add `true` to skip the confirmation menu.
* `/sheets rename <old> <new>`: Renames an existing sheet.
* `/sheets copy <menu> <newname>`: Creates a copy of a menu with a new name.

### Data Management

* `/sheets export <menu> <path>`: Exports the menu configuration to the specified file path.
* `/sheets import <filepath> [name]`: Imports a menu from a file path.

### Development Commands

* `/sheets test <path>`: Runs a test on the specified configuration path.
* `/sheets debug <path>`: Toggles debug information for the specified path.
* `/sheets load <path>`: Directly loads a menu from a specific file path.


# Actions

Actions allow you to add functionality to your buttons. When a player interacts with a button, the associated actions are executed.

### Action Syntax

Actions can be defined as simple strings or as structured maps in YAML.

**String Syntax:**

```yaml
actions:
  - message: "Hello world!"
  - command: "say %player_name% clicked this!"
```

**Map Syntax:**

```yaml
actions:
  - open: "another_menu"
  - sound: "entity.experience_orb.pickup"
```

### Supported Action Types

| Action            | Description                                                                                 | Aliases   |
| ----------------- | ------------------------------------------------------------------------------------------- | --------- |
| `message`         | Sends a message to the player.                                                              |           |
| `command`         | Executes a command as the player.                                                           | `player`  |
| `console`         | Executes a command as the console.                                                          |           |
| `sudo`            | Executes a command as the player, bypassing permissions.                                    |           |
| `open`            | Opens another menu for the player.                                                          | `menu`    |
| `close`           | Closes the current menu.                                                                    |           |
| `sound`           | Plays a sound to the player.                                                                |           |
| `broadcast`       | Broadcasts a message to all players.                                                        |           |
| `broadcast-sound` | Plays a sound to all players.                                                               |           |
| `teleport`        | Teleports the player to a location or player.                                               | `tp`      |
| `world`           | Teleports the player to a specific world.                                                   |           |
| `server`          | Connects the player to another BungeeCord server.                                           | `connect` |
| `item`            | Gives an item to the player.                                                                | `give`    |
| `balance`         | Modifies the player's Vault balance.                                                        |           |
| `permission`      | Modifies the player's permissions.                                                          |           |
| `refresh`         | Refreshes the current menu content.                                                         |           |
| `argument`        | Sets a [local variable](/features/placeholders#1-multi-tier-system) for subsequent actions. |           |
| `input`           | Prompts for text input via an [Anvil menu](/features/editor#2-anvil-input).                 |           |

### Specialized Click Actions (Java Only)

Execute different actions based on the click type:

* `left`: Executed on left-click.
* `right`: Executed on right-click.
* `shift`: Executed on shift-click.
* `middle`: Executed on middle-click.

**Example:**

```yaml
actions:
  - left: "message: You left-clicked!"
  - right:
      message: "You right-clicked!"
  - middle:
      input:
        title: "Rename Item"
        command: "rename {text}"
```

### Input Action

The `input` action is used to get text input from the player.

```yaml
actions:
  - input:
      title: "Enter your name"
      command: "say hello {text}"
```

* `{text}`: The text entered by the player.

### Argument Action

Set local variables that can be used later.

```yaml
actions:
  - argument:
      target: "%player_name%"
  - message: "Hello {target}!"
```


# Requirements

Requirements are conditions that must be met for a button to be visible or clickable.

### Usage

Requirements are defined as lists of conditions. If all conditions in a list are met, the requirement is satisfied.

**YAML Example:**

```yaml
requirements:
  view:
    - "%player_has_permission_sheets.admin% = true"
  click:
    - "%vault_eco_balance% >= 100"
    - item:
        material: DIAMOND
        amount: 1
```

### Types of Requirements

| Requirement | Description                                    |
| ----------- | ---------------------------------------------- |
| `view`      | Controls if the button is visible in the menu. |
| `click`     | Controls if the player can click the button.   |

### Supported Conditions

Conditions can use [placeholders](/features/placeholders) and logical expressions to determine if a requirement is met.

| Condition    | Description                                          |
| ------------ | ---------------------------------------------------- |
| `condition`  | A logical expression (e.g., `%balance% > 100`).      |
| `permission` | Checks if the player has a specific permission.      |
| `balance`    | Checks the player's Vault balance.                   |
| `item`       | Checks for specific items in the player's inventory. |

### Logical Expressions

You can use standard comparison operators in your conditions:

* `=`, `!=`, `>`, `>=`, `<`, `<=`
* `contains`, `startsWith`, `endsWith`

**Example:**

```yaml
- "%player_name% = bed"
- "%vault_eco_balance% >= 500"
```


# Placeholders

Sheets features a multi-tier placeholder system to provide dynamic content in your menus.

### 1. Multi-Tier System

Sheets evaluates placeholders in the following order:

1. **Global Variables**: `{{variable_name}}`
   * Defined in `variables/*.yml`.
2. **Arguments/Local Variables**: `{variable_name}`
   * Passed via [commands](/getting-started/commands) or [actions](/features/actions) like [input](/features/editor#2-anvil-input).
3. **Special Placeholders**:
   * `[index]`: Current index in a dynamic slot range.
   * `[slot]`: Current slot number in a dynamic slot range.
4. **Math Expressions**: `{math:expression}` or `{math:int:expression}`
   * Example: `{math:1 + 1}` results in `2.0`.
   * Example: `{math:int:%player_health% * 2}` results in an integer.
5. **Sheets Internal Placeholders**:
   * `%sheets_sheet_[index]_name%`: Name of the Nth sheet.
   * `%sheets_sheet_[index]_exists%`: Whether the Nth sheet exists.
   * `%sheets_template_[index]_name%`: Name of the Nth template.
6. **PlaceholderAPI**: Full support for standard `%player_name%` style placeholders.

### 2. Math Expressions

You can perform calculations directly within your YAML configurations.

```yaml
name: "&aYour Health: {math:int:%player_health%}"
lore:
  - "&7Double health: {math:int:%player_health% * 2}"
```

### 3. Dynamic Slots

Use `[slot]` and `[index]` to create dynamic content based on slot ranges.

```yaml
slots:
  - 0to44

buttons:
  - slot: "[slot]"
    name: "&aItem #[index]"
    lore:
      - "&7This is slot number [slot]"
```


# Editor & Input

Sheets provides interactive ways to edit and interact with menus.

### 1. Chest Edit Mode (Java Only)

Chest Edit Mode allows you to visually edit your menus in-game.

#### How to Open

* Run [`/sheets edit <menu> chest`](/getting-started/commands#management-commands).
* Alternatively, open the edit menu with `/sheets edit` and right-click on the sheet you want to edit.

#### Functionality

1. Once in Chest Edit Mode, you can drag and drop items from your inventory into the menu or rearrange existing items.
2. Closing the inventory will automatically save the new layout to the menu's YAML file as `buttons`.
3. Each item in the menu will be saved with its material, name, and lore.

### 2. Anvil Input

Anvil menus can be used to capture text input from players.

#### Usage via Actions

Define an [`input` action](/features/actions#input-action) in your YAML:

```yaml
actions:
  - input:
      title: "Enter text"
      command: "say you entered {text}"
```

#### Dynamic Anvil Menus

If you specify a title in the `input` action that doesn't correspond to a pre-defined menu, Sheets will dynamically create an Anvil menu with that title.

#### Real-time Updates

Anvil menus refresh every second (20 ticks), allowing placeholders like `{text}` to update in item names and lore as the player types.

#### Confirmation Button

Slot 2 in an Anvil menu is typically used as the confirmation button. The action defined in the `input` command will be executed when this button is clicked.


# Converter

Sheets can automatically detect and convert DeluxeMenus configuration files into its native format.

### Automatic Detection

When a DeluxeMenus file is loaded, Sheets will:

1. Detect that the file is in the DeluxeMenus format.
2. Convert it into the Sheets format.
3. Automatically save the converted format back to the file.

### How to Convert

Simply place your DeluxeMenus files into the `plugins/Sheets/menus/` folder and run `/sheets reload`.

### Supported Conversions

* Menu settings (title, size, inventory type).
* Buttons and items.
* [Requirements](/features/requirements) (view and click).
* [Actions](/features/actions) (player and console commands).
* Placeholder syntax conversion.

### Why Use the Converter?

* **Ease of Transition**: Move your existing menus from DeluxeMenus to Sheets with minimal effort.
* **Unified Support**: Take advantage of Sheets' Bedrock form support for your existing menus.
* **Modern Features**: Use new features like Chest Edit Mode and Anvil input with your converted menus.


# Templates

Templates allow you to quickly create new menus using pre-defined structures.

### Templates Folder

All templates are stored in `plugins/Sheets/menus/templates/`.

### Default Templates

Sheets comes with several default templates:

* `basic_gui`: A standard inventory GUI.
* `simple_inventory`: A basic inventory-based menu.
* `anvil_input`: A template for [Anvil input menus](/features/editor#2-anvil-input).

### Usage

#### Commands

Run [`/sheets create <name> <template>`](/getting-started/commands#management-commands) to create a new sheet from a template.

```bash
/sheets create my_new_menu basic_gui
```

#### Graphical Interface

1. Run `/sheets create`.
2. Select **Create from Template**.
3. Choose your desired template from the list.
4. Enter the name for your new sheet.

### Creating Your Own Templates

1. Navigate to `plugins/Sheets/menus/templates/`.
2. Create a new YAML file.
3. Design your menu as usual.
4. Save the file and run `/sheets reload`.
5. Your new template will now appear in the template selector.


# Configuration

Sheets uses YAML for configuration files.

### Global Configuration (`config.yml`)

The global configuration file for Sheets is located at `plugins/Sheets/config.yml`.

```yaml
# Mode for plugin messages
small-caps: false

# Debug mode
debug:
  enabled: false

# Custom messages
messages:
  insufficient-requirements: "&cYou have not meet the requirements to do this"
  insufficient-funds: "&cYou do not have enough money to do this"
  insufficient-items: "&cYou do not have the required items to do this"
```

### Menu Configurations

Each menu is stored in its own YAML file in the `plugins/Sheets/menus/` folder.

#### Basic Settings

* `name`: Unique name for the menu.
* `title`: The title shown at the top of the menu (Java/Bedrock).
* `type`: The type of menu (`normal` or `anvil`).
* `size`: The size of the Java GUI (e.g., 9, 18, 27, 36, 45, 54).
* `commands`: List of commands that open this menu.

#### Button Settings

Buttons are defined in the `buttons` list.

* `slot`: The slot number or dynamic slot range.
* `material`: The Minecraft material for the item.
* `image`: The image URL or path for Bedrock form buttons.
* `name`: The display name of the item.
* `lore`: List of lore lines for the item.
* `requirements`: Conditions for visibility and interaction. See [Requirements](/features/requirements).
* `actions`: Actions to perform when clicked. See [Actions](/features/actions).

### Variables

Global variables are defined in the `variables/` folder.

```yaml
prefix: "&c&sServername"
server-ip: "123.45.67.89"
```

Use them in your menus with `{{variable_name}}`. See [Placeholders](/features/placeholders).


# Platform-Specific

Sheets is designed to provide a unified experience across Java and Bedrock Edition, but some features are platform-specific.

### Unified Titles

You can provide different titles for Java and Bedrock within a single configuration.

```yaml
title:
  java: "&cJava Inventory"
  bedrock: "&bBedrock Form"
```

If a simple string is provided, it will be used for both platforms.

### Bedrock-Specific Features

#### Button Images

Bedrock forms support images on buttons. You can provide a URL or a resource path.

```yaml
buttons:
  - slot: 0
    material: DIAMOND
    name: "&bDiamond Button"
    image: "https://example.com/diamond_icon.png"
```

#### Bedrock-Only Content

You can define items and content that will only be visible to Bedrock players.

```yaml
buttons:
  - slot: 1
    material: BEDROCK
    name: "&cBedrock Players Only"
    requirements:
      view:
        - "%sheets_is_bedrock% = true"
```

See [Requirements](/features/requirements) for more information on conditions.

### Java-Specific Features

#### Chest Edit Mode

The visual [chest editor](/features/editor#1-chest-edit-mode-java-only) is only available to Java players.

#### Inventory Types

Java supports various inventory types (e.g., HOPPER, DISPENSER, BREWING\_STAND), which are rendered as standard forms on Bedrock.

#### Advanced Lore and Formatting

Java Edition supports more complex text formatting and multi-line lore that may be rendered differently in Bedrock forms.


