Cuberite Forum

Full Version: How should I use cPluginManager.ExecuteConsoleCommand ???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I was wondering if I could solve the commandblock issue by making a console command that would use cPluginManager.ExecuteConsoleCommand to simulate a command being run by a player. To test it, I made a new function which simply ran
Code:
cPluginManager.ExecuteConsoleCommand(cPluginManager, "/say Does this work?!?")
It said it had executed properly but there was no message in the chat. Why did that happen?
I believe console commands don't start with a /.

Also, you can if you use a colon you don't have to provide cPluginManager as an argument:

cPluginManager:ExecuteConsoleCommand("say Does this work?!?");