MCPcopy Create free account
hub / github.com/cuberite/cuberite / OnPlayerLeftClick

Method OnPlayerLeftClick

src/Bindings/PluginLua.cpp:778–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776
777
778bool cPluginLua::OnPlayerLeftClick(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, char a_Status)
779{
780 cCSLock Lock(m_CriticalSection);
781 bool res = false;
782 cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLAYER_LEFT_CLICK];
783 for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr)
784 {
785 m_LuaState.Call((int)(**itr), &a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_Status, cLuaState::Return, res);
786 if (res)
787 {
788 return true;
789 }
790 }
791 return false;
792}
793
794
795

Callers 1

Calls 3

beginMethod · 0.80
endMethod · 0.80
CallMethod · 0.45

Tested by

no test coverage detected