]> git.lizzy.rs Git - minetest.git/commit
Add more ways to pass data to check_player_privs
authorRobert Zenz <Robert.Zenz@bonsaimind.org>
Thu, 3 Sep 2015 19:28:38 +0000 (21:28 +0200)
committerest31 <MTest31@outlook.com>
Thu, 22 Oct 2015 17:55:48 +0000 (19:55 +0200)
commitc32847838d72c327031520c48b76607b63da4ccc
tree9b5d7f9015dda039264652d23f8a38f4a09e3b74
parent37c1e2012724a5d74aa0b720ab91953a2cf2bf05
Add more ways to pass data to check_player_privs

The callback can now be invoked with either the player object or name as
the first parameter, and with either a table or a list of strings, like
this:

    minetest.check_player_privs(player_name, { shout = true, fly = true })
    minetest.check_player_privs(player_name, "shout", "fly")
    minetest.check_player_privs(player, { shout = true, fly = true })
    minetest.check_player_privs(player, "shout", "fly")
builtin/game/misc.lua
doc/lua_api.txt