Brigadier based command API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package io.papermc.paper.plugin.lifecycle.event.types;
|
||||
|
||||
import io.papermc.paper.command.brigadier.Commands;
|
||||
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
|
||||
import io.papermc.paper.plugin.lifecycle.event.LifecycleEvent;
|
||||
import io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager;
|
||||
import io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner;
|
||||
import io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
@@ -17,6 +19,13 @@ import org.jspecify.annotations.NullMarked;
|
||||
@NullMarked
|
||||
public final class LifecycleEvents {
|
||||
|
||||
/**
|
||||
* This event is for registering commands to the server's brigadier command system. You can register a handler for this event in
|
||||
* {@link org.bukkit.plugin.java.JavaPlugin#onEnable()} or {@link io.papermc.paper.plugin.bootstrap.PluginBootstrap#bootstrap(BootstrapContext)}.
|
||||
* @see Commands an example of a command being registered
|
||||
*/
|
||||
public static final LifecycleEventType.Prioritizable<LifecycleEventOwner, ReloadableRegistrarEvent<Commands>> COMMANDS = prioritized("commands", LifecycleEventOwner.class);
|
||||
|
||||
//<editor-fold desc="helper methods" defaultstate="collapsed">
|
||||
@ApiStatus.Internal
|
||||
static <E extends LifecycleEvent> LifecycleEventType.Monitorable<Plugin, E> plugin(final String name) {
|
||||
|
||||
Reference in New Issue
Block a user