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 Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionUnknownCommandEvent
(@NotNull CommandSender sender, @NotNull String commandLine, @Nullable Component message) -
Method Summary
Modifier and TypeMethodDescriptionGets the command that was sendstatic @NotNull HandlerList
Deprecated.Gets the CommandSender or ConsoleCommandSendermessage()
Gets message that will be returnedvoid
Sets message that will be returnedvoid
setMessage
(@Nullable String message) Deprecated.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
UnknownCommandEvent
-
-
Method Details
-
getSender
Gets the CommandSender or ConsoleCommandSender- Returns:
- Sender of the command
-
getCommandLine
Gets the command that was send- Returns:
- Command sent
-
getMessage
Deprecated.usemessage()
Gets message that will be returned- Returns:
- Unknown command message
-
setMessage
Deprecated.Sets message that will be returnedSet to null to avoid any message being sent
- Parameters:
message
- the message to be returned, or null
-
message
Gets message that will be returned- Returns:
- Unknown command message
-
message
Sets 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:
getHandlers
in classEvent
-
getHandlerList
-
message()