Skip to content
OnixOne edited this page Apr 8, 2026 · 2 revisions

Установка

Добавляем репозиторий

1

repositories { mavenCentral() maven { url 'https://jitpack.io' } }

2

Создаем любой евент

import dev.onix.events.Cancellable;
import dev.onix.events.Event;

public class MyFirstEvent implements Event, Cancellable {
    private boolean cancel;
    @Override
    public boolean isCancelled() {
        return cancel;
    }

    @Override
    public void cancel() {
        cancel = true;
    }
}

3 Вызываем евент

        MyFirstEvent event = new MyFirstEvent();
        EventManager.callEvent(event);
        if (event.isCancelled()) {
            System.out.println("Евент отменен");
        }

Clone this wiki locally