Bukkit/CraftBukkit — pull request #671 by jrtc27 (2012-02-15 22:37:30+00:00)
Title: Added PlayerPortalEvent-Related Values To TeleportCause Enum

Currently the dimension to which the player will travel can only be obtained by a plugin if the dimension of the world they are coming from is less than 10 (i.e. not a Bukkit multiworld). This is a better implementation of an old pull request, https://github.com/Bukkit/CraftBukkit/pull/629.

There was also one place where the player's dimension were being used to determine what dimension the player should travel to, and another in NMS.ServerConfigurationManager.changeDimension() for determining whether to use a travel agent, both of which have been changed to use the environment's id instead.

This fixes https://bukkit.atlassian.net/browse/BUKKIT-265.

Corresponding Bukkit pull request: https://github.com/Bukkit/Bukkit/pull/524