Added direct teleport into exec chamber
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Mon, 19 Feb 2018 15:26:18 +0000 (16:26 +0100)
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>
Mon, 19 Feb 2018 15:26:18 +0000 (16:26 +0100)
depends.txt [new file with mode: 0644]
init.lua

diff --git a/depends.txt b/depends.txt
new file mode 100644 (file)
index 0000000..cdf2c91
--- /dev/null
@@ -0,0 +1,2 @@
+xban2?
+banish?
index d47e014..6e0cf27 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -1,4 +1,5 @@
 local spawn_spawnpos = minetest.setting_get_pos("static_spawnpoint")
+local execution_pos = {x=-310,y=0,z=-40}
 
 places = {}
 
@@ -14,6 +15,10 @@ places.register_place = function (name, pos, command)
                 if not player then
                         return false, "Player not found"
                 end
+               if xban and xban.get_property(nm, "jailed") then
+                  player:setpos(execution_pos)
+                  return true, "Nice try! You can't escape!"
+               end
                player:setpos(pos)
                return true, "Teleporting to "..name.."..."
         end,