minetest.register_on_removeentity(function(self))
Genshin 於 3 年之前 修改了此頁面

Called when a entity is about to be removed from the map by method objectRef:remove()

  • self: The entity that is about to be removed

Example:

minetest.register_on_removeentity(function(self)
  minetest.chat_send_all(self.name.." has been removed")
end)