All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.event.EventDispatcher Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
package net.minestom.server.event;

import net.minestom.server.MinecraftServer;
import net.minestom.server.event.trait.CancellableEvent;
import org.jetbrains.annotations.NotNull;

public final class EventDispatcher {

    public static void call(@NotNull Event event) {
        MinecraftServer.getGlobalEventHandler().call(event);
    }

    public static  ListenerHandle getHandle(@NotNull Class handleType) {
        return MinecraftServer.getGlobalEventHandler().getHandle(handleType);
    }

    public static void callCancellable(@NotNull CancellableEvent event, @NotNull Runnable successCallback) {
        MinecraftServer.getGlobalEventHandler().callCancellable(event, successCallback);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy