how to send commands to console spigot plugin code example
Example: how to send commands to console spigot plugin
getServer().dispatchCommand(getServer().getConsoleSender(), "command");
getServer().dispatchCommand(getServer().getConsoleSender(), "command");