Buggy code:
public class RyeDragon extends EntityEnderDragon { private int currentindexWaypoint = 0 ; private Location destlocOtherworld ; private double distanceX ; private double distanceY ; private double distanceZ ; Entity dragonEntity ; Player rider ; private boolean finalmove = false ; boolean isFlight = false ; String flightName ; boolean isTravel = false ; private boolean move = false ; private Waypoint nextWaypoint ; private int numberOfWaypoints ; private String statFromName ; private String statToName ; Location spawnOtherWorld ; Location start ; private double startX ; private double startY ; private double startZ ; private World toWorld ; private double toX ; private double toY ; private double toZ ; private int travelY ; private List < Waypoint > waypoints = new ArrayList < Waypoint > ( ) ; private double interworldDistribution = 80 ; private double coveredDist ; private double totalDist ; private long estduration ; private double XperTick ; private double YperTick ; private double ZperTick ; public RyeDragon ( Location loc , World notchWorld ) { } public RyeDragon ( World world ) { } @ Override public void m ( ) { } public void flight ( ) { } private float getCorrectYaw ( double targetx , double targetz ) { } public Entity getEntity ( ) { } public void setMoveFlight ( ) { } public void setMoveTravel ( ) { } public void startFlight ( Flight flight ) { } public void startTravel ( Location destinationLoc , Boolean interworld ) { } public void travel ( ) { if ( ! ( move ) ) return ; if ( ( dragonEntity . getPassenger ( ) ) == null ) return ; double myX = locX ; double myY = locY ; double myZ = locZ ; if ( finalmove ) { if ( ( ( int ) ( locY ) ) > ( ( int ) ( toY ) ) ) myY -= DragonTravelMain . speed ; else if ( ( ( int ) ( locY ) ) < ( ( int ) ( toY ) ) ) myY += DragonTravelMain . speed ; else { if ( ( dragonEntity . getWorld ( ) . getName ( ) ) != ( toWorld . getName ( ) ) ) { this . rider = ( ( Player ) ( dragonEntity . getPassenger ( ) ) ) ; spawnOtherWorld = destlocOtherworld . clone ( ) ; spawnOtherWorld . setX ( ( ( destlocOtherworld . getX ( ) ) + ( interworldDistribution ) ) ) ; spawnOtherWorld . setY ( ( ( destlocOtherworld . getY ( ) ) + ( interworldDistribution ) ) ) ; spawnOtherWorld . setZ ( ( ( destlocOtherworld . getZ ( ) ) + ( interworldDistribution ) ) ) ; spawnOtherWorld . getChunk ( ) . load ( ) ; Bukkit . getScheduler ( ) . runTaskLater ( Bukkit . getPluginManager ( ) . getPlugin ( "DragonTravel" ) , new Runnable ( ) { public void run ( ) { DragonManagement . dismount ( rider , true ) ; if ( rider . getAllowFlight ( ) ) rider . setFlying ( true ) ; if ( ( spawnOtherWorld . getZ ( ) ) < ( destlocOtherworld . getZ ( ) ) ) spawnOtherWorld . setYaw ( ( ( float ) ( - ( Math . toDegrees ( Math . atan ( ( ( ( spawnOtherWorld . getX ( ) ) - ( destlocOtherworld . getX ( ) ) ) // ( ( spawnOtherWorld . getZ ( ) ) - ( destlocOtherworld . getZ ( ) ) ) ) ) ) ) ) ) ) ; else if ( ( spawnOtherWorld . getZ ( ) ) > ( destlocOtherworld . getZ ( ) ) ) spawnOtherWorld . setYaw ( ( ( ( float ) ( - ( Math . toDegrees ( Math . atan ( ( ( ( spawnOtherWorld . getX ( ) ) - ( destlocOtherworld . getX ( ) ) ) // ( ( spawnOtherWorld . getZ ( ) ) - ( destlocOtherworld . getZ ( ) ) ) ) ) ) ) ) ) + 180.0F ) ) ; rider . teleport ( spawnOtherWorld ) ; <START_BUG> if ( ! ( DragonManagement . mount ( rider ) ) ) <END_BUG> return ; if ( ! ( listofDragonriders . containsKey ( rider ) ) ) return ; rider . setFlying ( false ) ; RyeDragon dragon = listofDragonriders . get ( rider ) ; dragon . startTravel ( destlocOtherworld , false ) ; dragonEntity . remove ( ) ; } } , 1L ) ; } else { DragonManagement . removeRiderandDragon ( dragonEntity , true ) ; return ; } } setPosition ( myX , myY , myZ ) ; return ; } if ( ( ( int ) ( locY ) ) < ( travelY ) ) myY += DragonTravelMain . speed ; if ( myX < ( toX ) ) myX += XperTick ; else myX -= XperTick ; if ( myZ < ( toZ ) ) myZ += ZperTick ; else myZ -= ZperTick ; if ( ( ( ( int ) ( myZ ) ) == ( ( int ) ( toZ ) ) ) && ( ( ( ( ( int ) ( myX ) ) == ( ( int ) ( toX ) ) ) || ( ( ( int ) ( myX ) ) == ( ( ( int ) ( toX ) ) + 1 ) ) ) || ( ( ( int ) ( myX ) ) == ( ( ( int ) ( toX ) ) - 1 ) ) ) ) { finalmove = true ; } setPosition ( myX , myY , myZ ) ; } }

Fix:
if ( ! ( DragonManagement . mount ( rider , false ) ) )