Command execution from plugins
#1
Since command blocks don't work at the moment, is there a way to execute any command from a plugin? I'm working on my first plugin right now (Clickable signs, that execute a command).

Thanks.:D
Reply
Thanks given by:
#2
To enable command blocks, you need to set CommandBlocksEnabled to true on your world.ini file on the world you want to enable command blocks.

For the command execute, here is an example:
local pluginManager = cRoot:Get():GetPluginManager()
local MyCvar = "/spawn" -- Teleports back to spawn
pluginManager:ExecuteCommand( a_Player, MyCvar )

You should also check the API for all the information, it will help alot. Smile
Reply
Thanks given by: Seadragon91 , NiLSPACE , sphinxc0re




Users browsing this thread: 1 Guest(s)