Remove redundant ifs from plugins' command handling