This works the same as in the Spigot's implementation.
Please read this page on how to use it. Remember to replace CommandSender with CommandSource.
CommandSender
CommandSource
Last updated 2 years ago