Respawn after dead in prison

Post Reply
paulvdv
Member
Posts: 20
Joined: Sat Sep 22, 2018 11:01

Respawn after dead in prison

by paulvdv » Post

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: 4524
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Respawn after dead in prison

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

paulvdv
Member
Posts: 20
Joined: Sat Sep 22, 2018 11:01

Re: Respawn after dead in prison

by paulvdv » Post

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest