misc.py added login portal safety

This commit is contained in:
shillingp
2014-06-16 16:19:32 +00:00
parent d6635c8951
commit 684c0c50e3

View File

@@ -32,6 +32,13 @@ def onJoin(event):
msg(player, " &6thank you and happy playing ;)") msg(player, " &6thank you and happy playing ;)")
msg(player, " \n ") 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 # /sudo - execute command/chat *as* a player/console