Command execution from plugins - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: Command execution from plugins (/thread-2166.html) |
Command execution from plugins - cubeservercrafter - 10-16-2015 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 RE: Command execution from plugins - JonnyBoy0719 - 10-16-2015 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. |