Skip to content

Navigating Between Views

Natan Vieira edited this page May 30, 2023 · 22 revisions

Navigation between screens is a built-in feature in Inventory Framework that allows you to move between screens in a simple way.

Table of Contents

Basic Usage

This example opens the A view when the player clicks in a item in the B view.

class A extends View { ... }

class B extends View {

    @Override
    public void onFirstRender(RenderContext render) {
        render.firstSlot(...).onClick(click -> click.open(A.class));
    }

}
Clone this wiki locally