chat_commands.lua 294 B

123456789
  1. minetest.register_chatcommand('base', {
  2. description = 'Teleport back to player base, helpful if lost :)',
  3. func = function(name)
  4. local base_pos = kobo.bases[name]
  5. local player_obj = core.get_player_by_name(name)
  6. player_obj:set_pos(core.string_to_pos(base_pos))
  7. end
  8. })