Cuberite Forum

Full Version: Confusion with call syntax
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi. I can't help but noticed that sometimes stuff is done through cRoot:Get(), or like so:
Code:
local root = cRoot:Get()
local world = root:GetDefaultWorld()
And sometimes it's like cPluginManager.AddHook( cPluginManager.HOOK_PLAYER_LEFT_CLICK, OnPlayerLeftClick )

Can someone please explain me the sacred meaning behind all this? Because I'd like to know in my mind in which case what should be used, I don't like the idea of having to ho through 5 different previous sources to find my case and using it.
This is due to my prior lesser knowledge of how things are done in Lua. There's an issue on GitHub for fixing this:
https://github.com/mc-server/MCServer/issues/401