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