Typing "/kill @e[type=!Player,r=1,c=1]" when there are no nearby entities besides yourself (All entities are outside of 1 radius of you) produces the error "The entity UUID provided is in an invalid format" despite the fact that the format is actually correct and it just can't find an entity to kill. This is not an issue if you remove the radius, count or type arguments (Removing type just kills you). This works for all types and radii that I tested, but only if count is 1.
Code analysis by @unknown can be found in this comment.
Comments


It happens with a few other commands even if c is not used. The issue should be expanded to include other entity selector arguments.
For example, the command: testfor @p[ry=100] will give the same error message if no player is found that matches the argument.

Confirmed for
1.8.4 But it seems like a general command feedback inconsistency.
And it seems like the *c=1*
is causing that. Try */kill @e[type=Endermite,c=1]*
and it will cause the same error message.
Note that this also effects the */scoreboard*
command

Confirmed for 1.8.6.

Confirmed for 1.8.8.

Confirmed for 15w31a.

Confirmed for
1.10

The reason for this is that the method net.minecraft.command.CommandHandler.executeCommand(ICommandSender, String)
acts different when the selector searches for one entity only (also affects @p
and @r
). For multiple entities it parses the selector and adds every matching entity to a list. It then executes the command with the UUID of every entity in the list. This means this way it can never create an error because invalid selectors would result in an empty list. For a single entity the selector is directly executed. There it tries to parse the selector as UUID if all other ways failed (selector parsing and name parsing for players). As the selector is no valid UUID it throws the error.
This could be prevented by removing the extra situation for a single entity because in the end the method net.minecraft.command.EntitySelector.matchEntities(ICommandSender, String, Class<? extends T>)
is called for both situations.
Solving it this way would require an additional check using the net.minecraft.command.EntitySelector.tokenPattern
to test if the provided selector is an UUID.

Fixed for 16w41a
Confirmed. It happens with any command with target selector c=1 and there are no entities within the defined radius.