function playerJoinedHandler(event)
  log("############# playerJoinedHandler fired ##############")
  spell:execute("/tellraw " .. event.player.name .. " {text:\"Welcome to the pits\"}")
end

spell:intercept({"PlayerJoinedEvent"}, playerJoinedHandler)

while true do
	log("tick")
	sleep(20)
end