Bukkit/CraftBukkit — pull request #1012 by EdGruberman (2013-02-01 16:57:32+00:00)
Title: Always return a TravelAgent; Fixes BUKKIT-3541

Recent changes caused PlayerPortalEvent to suddenly turn null
unexpectedly and could end up in NPEs resulting that did not before.
This commit addresses that situation by always ensuring a TravelAgent
instance is returned.

A global static instance is used to minimize impact of creating multiple
TravelAgent instances for each portal usage which is of concern for when
a lot of non-player entities are sent through portals and mirrors the
vanilla approach of a single instance per world but in this case, a
common instance is sufficient.

[BUKKIT-3541](https://bukkit.atlassian.net/browse/BUKKIT-3541)