Bukkit/CraftBukkit — pull request #629 by jrtc27 (2012-01-14 16:05:24+00:00)
Title: Add a PortalType property to PlayerPortalEvent

The new PortalType property allows plugins to always be able to tell what type of portal caused the event. 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/554.

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.

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