Package org.bukkit.event.command
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 SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Constructor SummaryConstructorsConstructorDescriptionUnknownCommandEvent(@NotNull CommandSender sender, @NotNull String commandLine, @Nullable Component message) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the command that was sendstatic @NotNull HandlerListDeprecated.Gets the CommandSender or ConsoleCommandSendermessage()Gets message that will be returnedvoidSets message that will be returnedvoidsetMessage(@Nullable String message) Deprecated.Methods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
UnknownCommandEvent
 
- 
- 
Method Details- 
getSenderGets the CommandSender or ConsoleCommandSender- Returns:
- Sender of the command
 
- 
getCommandLineGets the command that was send- Returns:
- Command sent
 
- 
getMessageDeprecated.usemessage()Gets message that will be returned- Returns:
- Unknown command message
 
- 
setMessageDeprecated.Sets message that will be returnedSet to null to avoid any message being sent - Parameters:
- message- the message to be returned, or null
 
- 
messageGets message that will be returned- Returns:
- Unknown command message
 
- 
messageSets message that will be returnedSet to null to avoid any message being sent - Parameters:
- message- the message to be returned, or null
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
- 
message()