diff options
Diffstat (limited to 'src/script/cpp_api/s_player.cpp')
-rw-r--r-- | src/script/cpp_api/s_player.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/script/cpp_api/s_player.cpp b/src/script/cpp_api/s_player.cpp index d357689f2..d7375082a 100644 --- a/src/script/cpp_api/s_player.cpp +++ b/src/script/cpp_api/s_player.cpp @@ -25,8 +25,8 @@ void ScriptApiPlayer::on_newplayer(ServerActiveObject *player) { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_newplayers - lua_getglobal(L, "minetest"); + // Get core.registered_on_newplayers + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_newplayers"); // Call callbacks objectrefGetOrCreate(player); @@ -37,8 +37,8 @@ void ScriptApiPlayer::on_dieplayer(ServerActiveObject *player) { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_dieplayers - lua_getglobal(L, "minetest"); + // Get core.registered_on_dieplayers + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_dieplayers"); // Call callbacks objectrefGetOrCreate(player); @@ -49,8 +49,8 @@ bool ScriptApiPlayer::on_respawnplayer(ServerActiveObject *player) { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_respawnplayers - lua_getglobal(L, "minetest"); + // Get core.registered_on_respawnplayers + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_respawnplayers"); // Call callbacks objectrefGetOrCreate(player); @@ -63,8 +63,8 @@ bool ScriptApiPlayer::on_prejoinplayer(std::string name, std::string ip, std::st { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_prejoinplayers - lua_getglobal(L, "minetest"); + // Get core.registered_on_prejoinplayers + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_prejoinplayers"); lua_pushstring(L, name.c_str()); lua_pushstring(L, ip.c_str()); @@ -80,8 +80,8 @@ void ScriptApiPlayer::on_joinplayer(ServerActiveObject *player) { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_joinplayers - lua_getglobal(L, "minetest"); + // Get core.registered_on_joinplayers + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_joinplayers"); // Call callbacks objectrefGetOrCreate(player); @@ -92,8 +92,8 @@ void ScriptApiPlayer::on_leaveplayer(ServerActiveObject *player) { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_leaveplayers - lua_getglobal(L, "minetest"); + // Get core.registered_on_leaveplayers + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_leaveplayers"); // Call callbacks objectrefGetOrCreate(player); @@ -105,8 +105,8 @@ void ScriptApiPlayer::on_cheat(ServerActiveObject *player, { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_cheats - lua_getglobal(L, "minetest"); + // Get core.registered_on_cheats + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_cheats"); // Call callbacks objectrefGetOrCreate(player); @@ -122,8 +122,8 @@ void ScriptApiPlayer::on_playerReceiveFields(ServerActiveObject *player, { SCRIPTAPI_PRECHECKHEADER - // Get minetest.registered_on_chat_messages - lua_getglobal(L, "minetest"); + // Get core.registered_on_chat_messages + lua_getglobal(L, "core"); lua_getfield(L, -1, "registered_on_player_receive_fields"); // Call callbacks // param 1 |