Runing commands as console in plugin

Discussion in 'Spigot Plugin Development' started by moocow9m, Jun 12, 2015.

  1. how do i run commands as console in a plugin i am making.
     
  2. Code (Text):
    Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "command");
     
     
  3. Also.
    Execute the command as a player.
    Using "p" instead of "Bukkit"