OpenFusion/scripts/test.lua
CPunch 80f0ff7479 Added World, Entity & Player wrappers
- LuaWrapper.cpp/lua_autopush was updated to support CNSocket*
- Added basic getters added for Entity, (x, y, z & type)
- Added basic getter for Player, (name)
- Added bases getter for World, (version)
- Added World.onPlayerAdded & World.onPlayerRemoved events
2021-05-09 08:40:39 -04:00

8 lines
221 B
Lua

print("Hello world!")
World.onPlayerAdded:listen(function(plr)
print(plr.type .. " " .. plr.name .. " joined from LUA!!")
end)
wait(2)
print("Hello world ~2 seconds later! running protcol version " .. World.version)