summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-10-01 19:23:43 +0200
committerMasy98 <masy@antheruscraft.de>2014-10-01 19:23:43 +0200
commitd37b047ebeb8b61c7af36d954f89bbe8cabe35d4 (patch)
treee7960a666620af6e3bcc22c43c15b4f7de808a59 /src/Bindings
parentFixed Red Sandstone and Prismarine drops (diff)
parentMerge pull request #1493 from Masy98/blocks (diff)
downloadcuberite-d37b047ebeb8b61c7af36d954f89bbe8cabe35d4.tar
cuberite-d37b047ebeb8b61c7af36d954f89bbe8cabe35d4.tar.gz
cuberite-d37b047ebeb8b61c7af36d954f89bbe8cabe35d4.tar.bz2
cuberite-d37b047ebeb8b61c7af36d954f89bbe8cabe35d4.tar.lz
cuberite-d37b047ebeb8b61c7af36d954f89bbe8cabe35d4.tar.xz
cuberite-d37b047ebeb8b61c7af36d954f89bbe8cabe35d4.tar.zst
cuberite-d37b047ebeb8b61c7af36d954f89bbe8cabe35d4.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/ManualBindings.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index d8134f159..f4764447c 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -1957,26 +1957,20 @@ static int tolua_cPlayer_PermissionMatches(lua_State * tolua_S)
// Check the params:
cLuaState L(tolua_S);
if (
- !L.CheckParamUserType(1, "cPlayer") ||
- !L.CheckParamString (2, 3) ||
- !L.CheckParamEnd (4)
+ !L.CheckParamUserTable(1, "cPlayer") ||
+ !L.CheckParamString (2, 3) ||
+ !L.CheckParamEnd (4)
)
{
return 0;
}
// Get the params:
- cPlayer * self = (cPlayer *)tolua_tousertype(tolua_S, 1, NULL);
- if (self == NULL)
- {
- LOGWARNING("%s: invalid self (%p)", __FUNCTION__, self);
- return 0;
- }
AString Permission, Template;
L.GetStackValues(2, Permission, Template);
// Push the result of the match:
- L.Push(self->PermissionMatches(StringSplit(Permission, "."), StringSplit(Template, ".")));
+ L.Push(cPlayer::PermissionMatches(StringSplit(Permission, "."), StringSplit(Template, ".")));
return 1;
}