spawn to teleport command, implemented head position
This commit is contained in:
9
misc.py
9
misc.py
@@ -32,12 +32,11 @@ 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()
|
loginloc = player.getLocation().getBlock().getType()
|
||||||
# headloc = player.getEyeLocation()
|
headloc = player.getEyeLocation().getBlock().getType()
|
||||||
blockmat = loginloc.getBlock().getType()
|
if (str(loginloc) or str(headloc) == "PORTAL"):
|
||||||
if str(blockmat) == "PORTAL":
|
|
||||||
msg(player, "Looks like you spawned in a portal... Let me help you out")
|
msg(player, "Looks like you spawned in a portal... Let me help you out")
|
||||||
server.dispatchCommand(player, "spawn")
|
player.teleport(player.getWorld().getSpawnLocation())
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user