minetest.register_on_rightclickplayer(function(player, clicker))
Genshin edytuje tę stronę 3 lat temu

Called when a player is right-clicked by another player.

  • player: ObjectRef - Player that was right-clicked
  • clicker: ObjectRef - Object that right-clicked, may or may not be a player

Example

minetest.register_on_rightclickplayer(function(player, clicker)
  minetest.chat_send_all("Player "..clicker:get_player_name().." right-clicked player "..player:get_player_name())
end)

Note: Minetest version 5.4 and above already have this function available on the modding api by default, this addon only contains a substitute version of it for backwards compatability reasons. It only activates for older clients.