Respawn after dead in prison

paulvdv
New member
 
Posts: 6
Joined: Sat Sep 22, 2018 11:01

Respawn after dead in prison

by paulvdv » Sat Sep 22, 2018 11:59

Hi, I am new to Minetest, I really like the game.

I have a server with a world and some bad kids on it. For that reason I've made a prison. It's possible to escape, but that's really difficult because I revoke them everything...

My problem is that the prisoners can die, and respawn outside the prison. Is there a way that I (as the admin) can make them respawn in the prison-bed? I cannot find where the respawn location is stored, its not in
.minetest/worlds/world/players/<name> . Maybe in the database?

I am using the normal minetest_game.

Or do you know a workaround for this "problem"?

Bye,
Paul
 

User avatar
Krock
Developer
 
Posts: 4114
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Respawn after dead in prison

by Krock » Sat Sep 22, 2018 13:20

Common ways to escape:

Command "/home": Revoke the "home" privileges to make it stop happening.
Death respawn in bed: Saved in "[worldname]/beds_player_spawns". Either set the minetest.conf setting "enable_bed_respawn" to "false" or use something like this in your prison mod to overwrite the last bed:
Code: Select all
beds.spawn[player:get_player_name()] = vector.new(position_of_prison_bed)
beds.save_spawns()

Teleport home in unified_inventory: Revoking "home" privilege suffices
Normal respawn on death (game without beds): Write a mod that sets the position of a player on respawn.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

paulvdv
New member
 
Posts: 6
Joined: Sat Sep 22, 2018 11:01

Re: Respawn after dead in prison

by paulvdv » Sat Sep 22, 2018 13:48

Krock wrote:Common ways to escape:

Command "/home": Revoke the "home" privileges to make it stop happening.
Death respawn in bed: Saved in "[worldname]/beds_player_spawns". Either set the minetest.conf setting "enable_bed_respawn" to "false" or use something like this in your prison mod to overwrite the last bed:
Code: Select all
beds.spawn[player:get_player_name()] = vector.new(position_of_prison_bed)
beds.save_spawns()

Teleport home in unified_inventory: Revoking "home" privilege suffices
Normal respawn on death (game without beds): Write a mod that sets the position of a player on respawn.


Ah, "beds_player_spawns" is what I need!
I revoke all privileges, so they don't have the home privilege.
Maybe I can create a very simple mod to put bad kids in prison, and to learn how creating a mod works.

Bye,
Paul
 


Return to Problems



Who is online

Users browsing this forum: No registered users and 4 guests