execute command from console spigot code example
Example: spigot execute command as console
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
String command = "command";
Bukkit.dispatchCommand(console, command)
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
String command = "command";
Bukkit.dispatchCommand(console, command)