Entity toBeTeleported; //The entity you want to teleport
Location teleportTo = new Location(world,x,y,z,yaw,pitch); //The location to teleport to
boolean success = toBeTeleported.teleport(teleportTo);
if(success) {
//Teleport was successful
}else {
//Teleport wasn't success...