Skip to content

Configuration Guide

Natan Vieira edited this page Nov 30, 2025 · 46 revisions

This guide covers all configuration options available. Use these options inside onInit(...) to define how a view behaves, looks, and interacts with players.

Tip

Per-Player Configuration

Before continuing, it's important to understand that the configuration defined in onInit serves as the base configuration for the view.
If you need to adjust the configuration per player—for example, changing the title only for a specific player—you can use modifyConfig inside onOpen. All configuration options available in onInit are also supported on a per-player basis within onOpen.

@Override
public void onOpen(OpenContext open) {
    open.modifyConfig().title("Hi, " + open.getPlayer().getName());
}

Inventory Appearance & Structure

Options that define how the inventory container itself is created.

title(String)

Sets the initial title of the inventory.

Preview
@Override
public void onInit(ViewConfigBuilder config) {
    config.title("Write something");
}

title(net.kyori.adventure.text.Component)

Sets the initial title using an Adventure Text Component.

Note

To use Adventure components as titles, make sure the inventory-framework-platform-paper module is on your classpath. See the Installation guide for details.

Preview
@Override
public void onInit(ViewConfigBuilder config) {
    config.title(Component.text("Write something")
                    .color(NamedTextColor.BLUE));
}

size(int)

Sets the size of the inventory.

Preview
@Override
public void onInit(ViewConfigBuilder config) {
    config.size(4); // rows
    config.size(45); // full size
}

maxSize()

Sets the size of the inventory to the maximum possible,
based on the inventory type.

Preview
@Override
public void onInit(ViewConfigBuilder config) {
    config.maxSize();
}

Affects Player Interaction

Structure Modification

Internal Behavior

Extension to External Features

Welcome to the Inventory Framework documentation.

▶️ Introduction

🧩 Core Topics

💡 Built-In Features

🧰 Extra Features

🤓 Advanced Usage

⚙️ Internal Mechanisms

🛠️ Tooling

You can find practical examples in the examples directory.

Clone this wiki locally