Class UnknownCommandEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.command.UnknownCommandEvent
Thrown when a player executes a command that is not defined.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionUnknownCommandEvent(CommandSourceStack commandSource, String commandLine, @Nullable Component message) -
Method Summary
Modifier and TypeMethodDescriptionGets the command that was sent.Gets the command source associated with this event.static HandlerListDeprecated.Gets the CommandSender.message()Gets the message that will be returned.voidSets the message that will be returned.voidsetMessage(@Nullable String message) Deprecated.Methods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
UnknownCommandEvent
@Internal public UnknownCommandEvent(CommandSourceStack commandSource, String commandLine, @Nullable Component message)
-
-
Method Details
-
getSender
-
getCommandSource
Gets the command source associated with this event.- Returns:
- the
CommandSourceStack
-
getCommandLine
-
getMessage
-
setMessage
Deprecated.Sets the message that will be returned.Set to
nullto avoid any message being sent- Parameters:
message- the message to be returned, ornull
-
message
-
message
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-
message()