From 684c0c50e304ef7876178a4b17accb4ddfdc6ee9 Mon Sep 17 00:00:00 2001 From: shillingp Date: Mon, 16 Jun 2014 16:19:32 +0000 Subject: [PATCH] misc.py added login portal safety --- misc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc.py b/misc.py index e6ad747..43852ed 100644 --- a/misc.py +++ b/misc.py @@ -32,6 +32,13 @@ def onJoin(event): msg(player, " &6thank you and happy playing ;)") msg(player, " \n ") + loginloc = player.getLocation() + # headloc = player.getEyeLocation() + blockmat = loginloc.getBlock().getType() + if blockmat == Material.PORTAL: + msg(player, "Looks like you spawned in a portal... Let me help you out") + server.dispatchCommand(player, "spawn") + # # /sudo - execute command/chat *as* a player/console