Class CommandRegistrationCallbackEvent

java.lang.Object
net.vitacraft.serverlibraries.api.event.events.commands.CommandRegistrationCallbackEvent
All Implemented Interfaces:
Event

public class CommandRegistrationCallbackEvent extends Object implements Event
Called when a server registers all commands.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CommandRegistrationCallbackEvent(com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource> dispatcher, net.minecraft.command.CommandRegistryAccess registryAccess, net.minecraft.server.command.CommandManager.RegistrationEnvironment environment)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource>
     
    net.minecraft.server.command.CommandManager.RegistrationEnvironment
     
    net.minecraft.command.CommandRegistryAccess
     
    boolean
     
    void
    setCancelled(boolean cancelled)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CommandRegistrationCallbackEvent

      public CommandRegistrationCallbackEvent(com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource> dispatcher, net.minecraft.command.CommandRegistryAccess registryAccess, net.minecraft.server.command.CommandManager.RegistrationEnvironment environment)
  • Method Details

    • getDispatcher

      public com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource> getDispatcher()
      Returns:
      The command dispatcher.
    • getRegistryAccess

      public net.minecraft.command.CommandRegistryAccess getRegistryAccess()
      Returns:
      The command registry access.
    • getEnvironment

      public net.minecraft.server.command.CommandManager.RegistrationEnvironment getEnvironment()
      Returns:
      The registration environment.
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Event
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Event