summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-30 13:44:03 +0200
committermadmaxoft <github@xoft.cz>2014-07-30 13:56:29 +0200
commit6476bd0e2ee7e128e3eaa56159f169f0a53736ff (patch)
treef98c5f99fc6155ea460b03791206bf0d6d16a332 /src/Bindings
parentAdded a cMojangAPI class for PlayerName -> UUID lookups, with cache. (diff)
downloadcuberite-6476bd0e2ee7e128e3eaa56159f169f0a53736ff.tar
cuberite-6476bd0e2ee7e128e3eaa56159f169f0a53736ff.tar.gz
cuberite-6476bd0e2ee7e128e3eaa56159f169f0a53736ff.tar.bz2
cuberite-6476bd0e2ee7e128e3eaa56159f169f0a53736ff.tar.lz
cuberite-6476bd0e2ee7e128e3eaa56159f169f0a53736ff.tar.xz
cuberite-6476bd0e2ee7e128e3eaa56159f169f0a53736ff.tar.zst
cuberite-6476bd0e2ee7e128e3eaa56159f169f0a53736ff.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/AllToLua.pkg1
-rw-r--r--src/Bindings/ManualBindings.cpp9
2 files changed, 7 insertions, 3 deletions
diff --git a/src/Bindings/AllToLua.pkg b/src/Bindings/AllToLua.pkg
index 1e5dfd2fe..d3e3f5b45 100644
--- a/src/Bindings/AllToLua.pkg
+++ b/src/Bindings/AllToLua.pkg
@@ -77,6 +77,7 @@ $cfile "../Map.h"
$cfile "../MapManager.h"
$cfile "../Scoreboard.h"
$cfile "../Statistics.h"
+$cfile "../Protocol/MojangAPI.h"
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index 6d69e2595..026a6bad5 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2157,11 +2157,11 @@ static int tolua_cClientHandle_SendPluginMessage(lua_State * L)
-static int tolua_cClientHandle_GetUUIDsFromPlayerNames(lua_State * L)
+static int tolua_cMojangAPI_GetUUIDsFromPlayerNames(lua_State * L)
{
cLuaState S(L);
if (
- !S.CheckParamUserTable(1, "cClientHandle") ||
+ !S.CheckParamUserTable(1, "cMojangAPI") ||
!S.CheckParamTable(2) ||
!S.CheckParamEnd(3)
)
@@ -3144,9 +3144,12 @@ void ManualBindings::Bind(lua_State * tolua_S)
tolua_constant(tolua_S, "MAX_VIEW_DISTANCE", cClientHandle::MAX_VIEW_DISTANCE);
tolua_constant(tolua_S, "MIN_VIEW_DISTANCE", cClientHandle::MIN_VIEW_DISTANCE);
tolua_function(tolua_S, "SendPluginMessage", tolua_cClientHandle_SendPluginMessage);
- tolua_function(tolua_S, "GetUUIDsFromPlayerNames", tolua_cClientHandle_GetUUIDsFromPlayerNames);
tolua_endmodule(tolua_S);
+ tolua_beginmodule(tolua_S, "cMojangAPI");
+ tolua_function(tolua_S, "GetUUIDsFromPlayerNames", tolua_cMojangAPI_GetUUIDsFromPlayerNames);
+ tolua_endmodule(tolua_S);
+
tolua_beginmodule(tolua_S, "cItemGrid");
tolua_function(tolua_S, "GetSlotCoords", Lua_ItemGrid_GetSlotCoords);
tolua_endmodule(tolua_S);