How do I spoof a command to make it seem like it came from the console, or an offline player. More specifically, how can I create an instance of the Command object (so I can use Command.execute()) I see that a child class of Command is PluginCommand, but I need to use it to run a command from a different plugin. Thanks in advance for any help.
Code:java getServer().dispatchCommand(CommandSender sender, String command) Example from console: Code:java getServer().dispatchCommand(getServer().getConsoleSender(), "save-all") Example from an offline player: Code:java getServer().dispatchCommand(getServer().getOfflinePlayer("Hunt800"), "save-all")