-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
enhancementNew feature or requestNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release
Description
Description
There should be an option available when utilizing the EntitySelectorArgument
to trigger an exception automatically when the resulting list is empty. This behavior mirrors the default implementation where argument.entity.notfound.entity or argument.entity.notfound.player is respectively returned.
Expected code
val myCommand = CommandAPICommand("myCommand")
.withArguments(EntitySelectorArgument.ManyPlayers("players", false)) // allowEmpty flag
.executes(CommandExecutor { sender, args ->
// automatically returns "argument.entity.notfound.player" if empty
val players = args[0] as List<Player>
// [...]
})
Extra details
No response
willkroboth
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public releaseThis has been implemented in the current dev build for the next public release