-
Notifications
You must be signed in to change notification settings - Fork 0
Home
OnixOne edited this page Apr 8, 2026
·
2 revisions
Добавляем репозиторий
repositories { mavenCentral() maven { url 'https://jitpack.io' } }
Создаем любой евент
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;
}
} MyFirstEvent event = new MyFirstEvent();
EventManager.callEvent(event);
if (event.isCancelled()) {
System.out.println("Евент отменен");
}