DispatchCommand Spigot

//as console :
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "command");
//or as player :
player.performCommand("command without /");
JavaBeast